Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }