예제 #1
0
    public void CarAudio()
    {
        // Arrange
        CarMotor car   = new CarMotor();
        var      audio = GetAudioMock();

        car.SetCarAudioInterface(audio);
        car.InitializeCarAudio(0.5f, 0.5f);

        //Act
        car.CarAudio();

        //Assert
        audio.Received().AdjustPitch(Arg.Any <float>());
        audio.Received().AdjustVolumes(Arg.Any <float>(), Arg.Any <float>(), Arg.Any <float>(), Arg.Any <float>());
    }
예제 #2
0
 private void Update()
 {
     m_Car.CarAudio();
 }
예제 #3
0
    public void CarAudio()
    {
        // Arrange
        CarMotor car = new CarMotor();
        var audio = GetAudioMock();
        car.SetCarAudioInterface(audio);
        car.InitializeCarAudio(0.5f, 0.5f);

        //Act
        car.CarAudio();

        //Assert
        audio.Received().AdjustPitch(Arg.Any<float>());
        audio.Received().AdjustVolumes(Arg.Any<float>(), Arg.Any<float>(), Arg.Any<float>(), Arg.Any<float>());
    }