public void BankToPrinceRegentFare() { var journey = new Journey { Origin = "Bank", Destination = "Prince Regent" }; var fareService = new FareService(new SqlFareRepository()); fareService.AssignFare(journey); Assert.That(journey.Fare, Is.EqualTo(10)); }
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)); }