public void ShouldGetAJourneyTime() { IPort portBuenosAires = _portRepository.GetPort("Buenos Aires"); IPort portNy = _portRepository.GetPort("New York"); IPort portLiverpool = _portRepository.GetPort("Liverpool"); IPort portCasablanca = _portRepository.GetPort("Casablanca"); IPort portCapetown = _portRepository.GetPort("Cape Town"); var journey = new Journey <IPort>(_routeRepository).WithPort(portBuenosAires).WithPort(portNy).WithPort(portLiverpool); var journey2 = new Journey <IPort>(_routeRepository).WithPort(portBuenosAires).WithPort(portCasablanca).WithPort(portLiverpool); var journey3 = new Journey <IPort>(_routeRepository).WithPort(portBuenosAires).WithPort(portCapetown).WithPort(portNy).WithPort(portLiverpool).WithPort(portCasablanca); var invalidjourney = new Journey <IPort>(_routeRepository).WithPort(portBuenosAires).WithPort(portCapetown).WithPort(portCasablanca); Assert.That(journey.GetTime(), Is.EqualTo(10)); Assert.That(journey2.GetTime(), Is.EqualTo(8)); Assert.That(journey3.GetTime(), Is.EqualTo(19)); Assert.That(invalidjourney.GetTime(), Is.EqualTo(0)); }