public void Init()
        {
            _readerStub     = Substitute.For <IDbReader>();
            _serviceManager = Substitute.For <IDbManager>();
            _serviceCommand = Substitute.For <ISingleResultCommand <string> >();

            _serviceManager.ExecuteReader(Arg.Any <IDbCommand>()).Returns(_readerStub);
            _serviceCommand.MapResult(_readerStub).Returns(_expected);
        }
Exemplo n.º 2
0
 public TResult ExecuteCommand <TResult>(ISingleResultCommand <TResult> command)
 => _dbInvokerFactory.Create(command).Invoke(_dbManager);
Exemplo n.º 3
0
 public ISingleResultCommandInvoker <TResult> Create <TResult>(ISingleResultCommand <TResult> serviceCommand)
 => new SingleResultCommandInvoker <TResult>(serviceCommand);
Exemplo n.º 4
0
 internal SingleResultCommandInvoker(ISingleResultCommand <TResult> command)
     : base(command)
 {
 }