Example #1
0
        public void GetTables_PassedSchemaName_OnlyFromSpecifiedSchemaAreReturned()
        {
            // Arrange

            var schemaViewsReader = new SchemaViewsReader(_dbConnectionString, _testSchema);

            // Act
            var databaseTables = schemaViewsReader.GetTables(null);

            // Assert
            Assert.AreEqual(1, databaseTables.Count());
        }
Example #2
0
        public void GetTables_PassingViewFilter_IsNotSupported()
        {
            // Arrange

            var schemaViewsReader = new SchemaViewsReader(_dbConnectionString, "SchemaViewsReaderTests");

            // Act
            Assert.Throws <NotSupportedException>(() => schemaViewsReader.GetTables(new List <TableInfo> {
                new TableInfo
                {
                    Name   = "EntityView2",
                    Schema = "dbo"
                }
            }));
        }