public void ComposeCommandArrayReturnsComposer() { Assert.IsInstanceOf <SqlNonQueryCommandComposer>( TSql.Compose( CommandFactory(), CommandFactory())); }
public void ComposeCommandEnumerationReturnsComposer() { Assert.IsInstanceOf <SqlNonQueryCommandComposer>( TSql.Compose((IEnumerable <SqlNonQueryCommand>) new[] { CommandFactory(), CommandFactory() })); }
public void ComposedCommandArrayIsPreservedAndReturnedByComposer() { var command1 = CommandFactory(); var command2 = CommandFactory(); SqlNonQueryCommand[] result = TSql.Compose(command1, command2); Assert.That(result, Is.EquivalentTo(new [] { command1, command2 })); }
public void ComposedCommandEnumerationIsPreservedAndReturnedByComposer() { var command1 = CommandFactory(); var command2 = CommandFactory(); SqlNonQueryCommand[] result = TSql.Compose((IEnumerable <SqlNonQueryCommand>) new[] { command1, command2 }); Assert.That(result, Is.EquivalentTo(new[] { command1, command2 })); }
public void ComposeCommandEnumerationCanNotBeNull() { Assert.Throws <ArgumentNullException>(() => TSql.Compose((IEnumerable <SqlNonQueryCommand>)null)); }
public void ComposeCommandArrayCanNotBeNull() { // ReSharper disable RedundantCast Assert.Throws <ArgumentNullException>(() => TSql.Compose((SqlNonQueryCommand[])null)); // ReSharper restore RedundantCast }