public void Then_Light_Value_Is_Read_Once()
 {
     MockAnalogOperations
     .Received()
     .Read(Arg.Is(MockLightSensor));
     MockAnalogOperations
     .Received(1)
     .Read(Arg.Any <IDevice>());
 }
Beispiel #2
0
        protected override void When()
        {
            MockAnalogOperations
            .Read(Arg.Any <IDevice>())
            .Returns(new OperationResult
            {
                ResultStatus = OperationResultEnum.Failiure
            });
            MockValidateOperationService
            .GetSequenceResult(Arg.Any <OperationResultEnum>())
            .Returns(SequenceResultEnum.Fail);

            _result = SUT.Run();
        }
        protected override void When()
        {
            MockAnalogOperations
            .Read(Arg.Any <IDevice>())
            .Returns(new OperationResult
            {
                ResultStatus = OperationResultEnum.Succeess,
                Return       = _lightLuxLevel
            });
            MockValidateOperationService
            .GetSequenceResult(Arg.Any <OperationResultEnum>())
            .Returns(SequenceResultEnum.Success);

            _result = SUT.Run();
        }