Exemplo n.º 1
0
        public void InvokeManyResultsCommand_ExpectCallReceivedOnManyResultsCommandInvoker()
        {
            var commandStub        = Substitute.For <IManyResultsCommand <bool> >();
            var commandInvokerMock = Substitute.For <IManyResultCommandInvoker <bool> >();

            _dbInvokerFactoryStub.Create(commandStub).Returns(commandInvokerMock);

            var sut = CreateDbInvoker();

            sut.ExecuteCommand(commandStub);

            commandInvokerMock.Received().Invoke(_dbServiceManagerStub);
        }
Exemplo n.º 2
0
 public IEnumerable <TResult> ExecuteCommand <TResult>(IManyResultsCommand <TResult> command)
 => _dbInvokerFactory.Create(command).Invoke(_dbManager);