public void ProceedPublishMessageWithRuntimePolicyOn(ModelBinder.BindModel sut, IAlternateMethodContext context, ControllerContext arg1, ModelBindingContext arg2) { context.Setup(c => c.Arguments).Returns(new object[] { arg1, arg2 }); sut.NewImplementation(context); context.TimerStrategy().Verify(t => t.Time(It.IsAny <Action>())); context.MessageBroker.Verify(mb => mb.Publish(It.IsAny <ModelBinder.BindModel.Message>())); }
public void ProceedAndReturnWithRuntimePolicyOff(ModelBinder.BindModel sut, IAlternateMethodContext context) { context.Setup(c => c.RuntimePolicyStrategy).Returns(() => RuntimePolicy.Off); sut.NewImplementation(context); context.Verify(c => c.Proceed()); context.MessageBroker.Verify(mb => mb.Publish(It.IsAny <object>()), Times.Never()); }