public void CalculateFuelConsumption()
        {
            // Arrange
            var flightMock = new Mock <IFlight>();

            flightMock.SetupGet(x => x.Name).Returns(flightName);
            _controlTower.RegisterFlight(flightMock.Object);

            // Act
            _controlTower.CalculateFuelConsumption(flightName);
            // Assert
            flightMock.Verify(x => x.CalculateFuelConsumption(), Times.Once);
        }
 public double CalculateFuelConsumption(string flightName)
 {
     return(_controlTower.CalculateFuelConsumption(flightName));
 }
Exemple #3
0
 public void WhenTheFuelConsumptionSimulatorCalculate(string flightName)
 {
     _fuelConsumption = _currentControlTower.CalculateFuelConsumption(flightName);
 }