示例#1
0
 public void SetUp()
 {
     _testableClock = new TestableClock
     {
         Display = A.Fake <IClockDisplay>()
     };
     _behavior = new StopwatchBehavior()
     {
         TimeSpan = new TimeSpan()
     };
     _behavior.Load(_testableClock);
 }
示例#2
0
        public async Task FactMethodName_IsSuccess_Should_CallProcessMethod()
        {
            var configuration      = new StopwatchConfiguration(true, 50, 50, 50, 50);
            var requestProcessor   = Mock.Of <IRequestProcessor <TestCommand> >();
            var requestInformation = new RequestInformation <TestCommand>
            {
                Elapsed = 500
            };

            IPipelineBehavior <TestCommand, Unit> stopwatchPipeline = new StopwatchBehavior <TestCommand, Unit>(
                configuration, requestInformation, requestProcessor);

            var testCommand = new TestCommand();
            var testHandler = new TestCommandHandler();

            var unit = await stopwatchPipeline.Handle(testCommand,