예제 #1
0
        public void Should_Generate_An_Insert_Statement_When_Passed_A_Class_With_No_Fields()
        {
            // Arrange
            var classWithNoFields = new DbCommandExtensionsTests.GenerateInsertForSqlServerTests.ClassWithNoFields();

            var databaseCommand = TestHelpers.GetDatabaseCommand();

            // Act
            databaseCommand = databaseCommand.GenerateInsertForSQLite(classWithNoFields);

            // Visual Assertion
            Trace.WriteLine(databaseCommand.DbCommand.CommandText);

            // Assert
            Assert.NotNull(databaseCommand.DbCommand.CommandText);
            Assert.That(databaseCommand.DbCommand.CommandText.Contains("INSERT"));
        }
        public void Should_Generate_An_Insert_Statement_When_Passed_A_Class_With_No_Fields()
        {
            // Arrange
            var classWithNoFields = new DbCommandExtensionsTests.GenerateInsertForSqlServerTests.ClassWithNoFields();

            var databaseCommand = TestHelpers.GetDatabaseCommand();

            // Act
            databaseCommand = databaseCommand.GenerateInsertForSQLite( classWithNoFields );

            // Visual Assertion
            Trace.WriteLine( databaseCommand.DbCommand.CommandText );

            // Assert
            Assert.NotNull( databaseCommand.DbCommand.CommandText );
            Assert.That( databaseCommand.DbCommand.CommandText.Contains( "INSERT" ) );
        }