public static IExecuteCommandHandler With(this IExecuteCommandHandler handler, Container <string> commands) { handler.GetRegistrationOptions().Returns(new ExecuteCommandRegistrationOptions { Commands = commands }); handler.Handle(Arg.Any <ExecuteCommandParams>(), Arg.Any <CancellationToken>()).Returns(Unit.Value); return(handler); }
public ClientCapabilityProviderFixture() { handler = Substitute.For <IExecuteCommandHandler>(); handler.GetRegistrationOptions().Returns(new ExecuteCommandRegistrationOptions()); var handlerCollection = new HandlerCollection { handler }; var capabilityProvider = new ClientCapabilityProvider(handlerCollection); Provider = capabilityProvider; }