public void InvokeCommand_ExpectServiceManagerReceivedCallOnExecuteNonQuery() { var serviceManager = Substitute.For <IDbManager>(); var serviceCommand = Substitute.For <INonQueryCommand <bool> >(); var sut = new NonQueryCommandInvoker <bool>(serviceCommand); sut.Invoke(serviceManager); serviceManager.Received().ExecuteNonQuery(Arg.Any <IDbCommand>()); }
public void InvokeCommandWithParameterFalse_ExpectOutputParameterTrue() { var parameterName = "key"; var serviceCommand = new FakeNonQueryCommand(parameterName); var serviceManager = Substitute.For <IDbManager>(); var sut = new NonQueryCommandInvoker <bool>(serviceCommand); var result = sut.Invoke(serviceManager); Assert.IsTrue(result); }