Exemple #1
0
 public void ComposeCommandArrayReturnsComposer()
 {
     Assert.IsInstanceOf <SqlNonQueryCommandComposer>(
         TSql.Compose(
             CommandFactory(),
             CommandFactory()));
 }
Exemple #2
0
 public void ComposeCommandEnumerationReturnsComposer()
 {
     Assert.IsInstanceOf <SqlNonQueryCommandComposer>(
         TSql.Compose((IEnumerable <SqlNonQueryCommand>) new[]
     {
         CommandFactory(),
         CommandFactory()
     }));
 }
Exemple #3
0
        public void ComposedCommandArrayIsPreservedAndReturnedByComposer()
        {
            var command1 = CommandFactory();
            var command2 = CommandFactory();

            SqlNonQueryCommand[] result = TSql.Compose(command1, command2);

            Assert.That(result, Is.EquivalentTo(new []
            {
                command1, command2
            }));
        }
Exemple #4
0
        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
            }));
        }
Exemple #5
0
 public void ComposeCommandEnumerationCanNotBeNull()
 {
     Assert.Throws <ArgumentNullException>(() => TSql.Compose((IEnumerable <SqlNonQueryCommand>)null));
 }
Exemple #6
0
 public void ComposeCommandArrayCanNotBeNull()
 {
     // ReSharper disable RedundantCast
     Assert.Throws <ArgumentNullException>(() => TSql.Compose((SqlNonQueryCommand[])null));
     // ReSharper restore RedundantCast
 }