public void VerifySchemaDetection(string schemaTable, string tableSchema, string table) { SharpMap.Data.Providers.SqlServer2008 sq = new SharpMap.Data.Providers.SqlServer2008("", schemaTable, "oidcolumn"); Assert.AreEqual(tableSchema, sq.TableSchema); Assert.AreEqual(table, sq.Table); 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); Assert.IsTrue(qualifiedTable.Contains(tableSchema)); Assert.IsTrue(qualifiedTable.Contains(table)); }
public void VerifySchemaDetection(string schemaTable, string tableSchema, string table) { SharpMap.Data.Providers.SqlServer2008 sq = new SharpMap.Data.Providers.SqlServer2008("", schemaTable, "geom", "oidcolumn", SqlServerSpatialObjectType.Geometry, 4326, SqlServer2008ExtentsMode.SpatialIndex); 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)); }