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); }
public TResult ExecuteCommand <TResult>(ISingleResultCommand <TResult> command) => _dbInvokerFactory.Create(command).Invoke(_dbManager);
public ISingleResultCommandInvoker <TResult> Create <TResult>(ISingleResultCommand <TResult> serviceCommand) => new SingleResultCommandInvoker <TResult>(serviceCommand);
internal SingleResultCommandInvoker(ISingleResultCommand <TResult> command) : base(command) { }