Ejemplo n.º 1
0
		public void GetAllTablesWithSchema()
		{
			IList<string> tables;
			using (var reader = new SqlSchemaReader(_cstr_db))
			{
				tables = reader.GetTables(null);
			}

			Assert.IsTrue(tables.Contains("[dbo].[Customer]"), "dbo.Customer not found");
			Assert.IsTrue(tables.Contains("[dbo].[Order]"), "dbo.Order not found");
			Assert.IsTrue(tables.Contains("[inventory].[Item]"), "inventory.Item not found");
		}
Ejemplo n.º 2
0
        public void GetdboTablesWithSchema()
        {
            IList <string> tables;

            using (var reader = new SqlSchemaReader(_cstr_db))
            {
                tables = reader.GetTables("dbo");
            }

            Assert.IsTrue(tables.Contains("[dbo].[Customer]"), "dbo.Customer not found");
            Assert.IsTrue(tables.Contains("[dbo].[Order]"), "dbo.Order not found");
            Assert.IsFalse(tables.Contains("[inventory].[Item]"), "inventory.Item not found");
        }