Example #1
0
 public void Car_ShouldTurnOff()
 {
     // Arrange
     var container = DiSetup.Setup();
     var car = container.GetInstance<ICar>();
     car.TurnOffCar();
     //Act
     bool actual = car.IsOn;
     // Assert
     Assert.False(actual);
 }
Example #2
0
 public void Car_ShouldStart()
 {
     // Arrange
     var container = DiSetup.Setup();
     var car = container.GetInstance<ICar>();
     car.StartCar();
     // Act
     bool expected = true;
     bool actual = car.IsOn;
     // Assert 
     Assert.Equal(expected, actual);
 }
Example #3
0
        public void Motor_ShouldReturnRPM()
        {
            // Arrange
            var container = DiSetup.Setup();
            var motor     = container.GetInstance <IMotor>();
            // Act
            var expected = 1000;
            var actual   = motor.GetRPM();

            // Assert
            Assert.Equal(expected, actual);
        }