Пример #1
0
 public void ComposeCommandArrayReturnsComposer()
 {
     Assert.IsInstanceOf <SqlNonQueryCommandComposer>(
         TSql.Compose(
             CommandFactory(),
             CommandFactory()));
 }
Пример #2
0
 public void ComposeCommandEnumerationReturnsComposer()
 {
     Assert.IsInstanceOf <SqlNonQueryCommandComposer>(
         TSql.Compose((IEnumerable <SqlNonQueryCommand>) new[]
     {
         CommandFactory(),
         CommandFactory()
     }));
 }
Пример #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
            }));
        }
Пример #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
            }));
        }
Пример #5
0
 public void ComposeCommandEnumerationCanNotBeNull()
 {
     Assert.Throws <ArgumentNullException>(() => TSql.Compose((IEnumerable <SqlNonQueryCommand>)null));
 }
Пример #6
0
 public void ComposeCommandArrayCanNotBeNull()
 {
     // ReSharper disable RedundantCast
     Assert.Throws <ArgumentNullException>(() => TSql.Compose((SqlNonQueryCommand[])null));
     // ReSharper restore RedundantCast
 }