Beispiel #1
0
        public void BankToPrinceRegentFare()
        {
            var journey = new Journey {Origin = "Bank", Destination = "Prince Regent"};
            var service = new FareService(new FareRepository());

            service.AssignFare(journey);

            Assert.That(journey.Fare, Is.EqualTo(10));
        }
Beispiel #2
0
        public void BankToBankFare()
        {
            var bank = "Bank";
            var journey = new Journey {Origin = bank, Destination = bank};
            var repositoryMockery = new Mock<IFareRepository>();
            var fareService = new FareService(repositoryMockery.Object);

            fareService.AssignFare(journey);

            repositoryMockery.Verify(r => r.GetFare(bank, bank));
        }
Beispiel #3
0
 internal void AssignFare(Journey jny)
 {
     jny.Fare = _fareFareRepository.GetFare(jny.Origin, jny.Destination);
 }
Beispiel #4
0
 internal void AssignFare(Journey jny)
 {
     jny.Fare = _fareFareRepository.GetFare(jny.Origin, jny.Destination);
 }