Beispiel #1
0
        public SqlProberTests()
        {
            this.FakeSqlItem = sql_item.CreateSqlItem(FAKE_DB_ENGINE, FAKE_DB_VERSION, FAKE_CONNECTION_STRING, FAKE_SQL_QUERY);
            this.FakeCollectedSqlItem = sql_item.CreateSqlItem(FAKE_DB_ENGINE, FAKE_DB_VERSION, FAKE_CONNECTION_STRING, FAKE_SQL_QUERY);
            this.FakeCollectedSqlItem.result = new EntityItemAnySimpleType[] { new EntityItemAnySimpleType() { Value = "10" }, new EntityItemAnySimpleType() { Value = "11" } };

            this.FakeSql57Item = sql57_item.CreateSqlItem(FAKE_DB_ENGINE, FAKE_DB_VERSION, FAKE_CONNECTION_STRING, FAKE_SQL_QUERY);
            this.FakeCollectedSql57Item = sql57_item.CreateSqlItem(FAKE_DB_ENGINE, FAKE_DB_VERSION, FAKE_CONNECTION_STRING, FAKE_SQL_QUERY);
            this.FakeCollectedSql57Item.result =
                new EntityItemRecordType[] 
                { 
                    new EntityItemRecordType() 
                    { 
                        field  = new EntityItemFieldType[] 
                        { 
                            new EntityItemFieldType() { name = "id", Value = "10" }, 
                            new EntityItemFieldType() { name = "name", Value = "John" } 
                        }
                    }
                };
        }
 private void AssertSql57Item(sql57_item sqlItemToAssert,
     string expectedEngineValue = "oracle",
     string expectedVersionValue = "9",
     string expectedConnectionStringValue = FAKE_CONNECTION_STRING,
     string expectedSqlValue = FAKE_SQL_QUERY)
 {
     ItemTypeEntityChecker.AssertItemTypeEntity(sqlItemToAssert.engine, expectedEngineValue);
     ItemTypeEntityChecker.AssertItemTypeEntity(sqlItemToAssert.version, expectedVersionValue);
     ItemTypeEntityChecker.AssertItemTypeEntity(sqlItemToAssert.connection_string, expectedConnectionStringValue);
     ItemTypeEntityChecker.AssertItemTypeEntity(sqlItemToAssert.sql, expectedSqlValue);
 }