public void ShouldCalculateFuelBetwenTwoAirportsWhenCreateFlight() { var expectedQuantityOfFuel = 46808.6; var dummyFlightBetweenCasaParis = FakeData.GetFlightBetweenCasaParis(); _flightRepoMoq.Setup(s => s.CreateFlight(dummyFlightBetweenCasaParis)).Returns(() => It.IsAny <int>()); var module = new FlightModule(_flightRepoMoq.Object); var result = module.CreateFlight(dummyFlightBetweenCasaParis); Assert.AreEqual(expectedQuantityOfFuel, result.AmountOfFuel); }
public void ShouldCalculateDistanceBetwenTwoAirportsWhenCreateFlight() { var expectedDistanceInKm = 1933; var dummyFlightBetweenCasaParis = FakeData.GetFlightBetweenCasaParis(); _flightRepoMoq.Setup(s => s.CreateFlight(dummyFlightBetweenCasaParis)).Returns(() => It.IsAny <int>()); var module = new FlightModule(_flightRepoMoq.Object); var result = module.CreateFlight(dummyFlightBetweenCasaParis); Assert.AreEqual(expectedDistanceInKm, result.DistanceInKM); }