Example #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));
        }
Example #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));
        }
Example #3
0
 internal void AssignFare(Journey jny)
 {
     jny.Fare = _fareFareRepository.GetFare(jny.Origin, jny.Destination);
 }
Example #4
0
 internal void AssignFare(Journey jny)
 {
     jny.Fare = _fareFareRepository.GetFare(jny.Origin, jny.Destination);
 }