Exemplo n.º 1
0
        public void VerifySchemaDetection(string schemaTable, string tableSchema, string table)
        {
            SharpMap.Data.Providers.SqlServer2008 sq = new SharpMap.Data.Providers.SqlServer2008("", schemaTable, "oidcolumn");
            NUnit.Framework.Assert.AreEqual(tableSchema, sq.TableSchema);
            NUnit.Framework.Assert.AreEqual(table, sq.Table);
            NUnit.Framework.Assert.AreEqual("oidcolumn", sq.ObjectIdColumn);

            System.Reflection.PropertyInfo pi = sq.GetType().GetProperty("QualifiedTable", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.GetProperty);
            string qualifiedTable             = (string)pi.GetValue(sq, null);

            NUnit.Framework.Assert.IsTrue(qualifiedTable.Contains(tableSchema));
            NUnit.Framework.Assert.IsTrue(qualifiedTable.Contains(table));
        }