예제 #1
0
        public void SchemaTest() // ComColumn. Manually add/remove tables/columns
        {
            DcTable t1 = schema.GetSubTable("Table 1");
            DcTable t2 = schema.GetSubTable("Table 2");

            // Finding by name and check various properties provided by the schema
            Assert.AreEqual(schema.GetPrimitiveType("Decimal").Name, "Decimal");

            Assert.AreEqual(t1.Name, "Table 1");
            Assert.AreEqual(t2.Name, "Table 2");
            Assert.AreEqual(schema.GetSubTable("Table 2"), t2);

            Assert.AreEqual(t1.GetColumn("Column 11").Name, "Column 11");
            Assert.AreEqual(t2.GetColumn("Column 21").Name, "Column 21");

            Assert.AreEqual(t2.GetColumn("Super").IsSuper, true);
            Assert.AreEqual(t2.SuperColumn.Input, t2);
            Assert.AreEqual(t2.SuperColumn.Output, schema.Root);

            // Test path enumerator
            var pathEnum = new PathEnumerator(t2, t1, ColumnType.IDENTITY_ENTITY);

            Assert.AreEqual(1, pathEnum.Count());
        }
예제 #2
0
 public bool IsInput(DcTable tab) // IsLess
 {
     var paths = new PathEnumerator(this, tab, ColumnType.IDENTITY_ENTITY);
     return paths.Count() > 0;
 }