public void AnySchemaAnyTableSelectionMatchesAll() { var tableSelection = new TableSelection() { Schema = TableSelection.Any, Table = TableSelection.Any }; Assert.True(tableSelection.Matches("SpecificSchema", "SpecificTable")); Assert.True(tableSelection.Matches("OtherSchema", "SpecificTable")); Assert.True(tableSelection.Matches("SpecificSchema", "OtherTable")); Assert.True(tableSelection.Matches("OtherSchema", "OtherTable")); Assert.True(tableSelection.Matches(TableSelection.Any, "SpecificTable")); Assert.True(tableSelection.Matches("SpecificSchema", TableSelection.Any)); Assert.True(tableSelection.Matches(TableSelection.Any, TableSelection.Any)); }
public void AnyTableSelectionMatchesProvidedSchemaIsTheSame() { var tableSelection = new TableSelection() { Schema = "SpecificSchema", Table = TableSelection.Any }; Assert.True(tableSelection.Matches("SpecificSchema", "SpecificTable")); Assert.False(tableSelection.Matches("OtherSchema", "SpecificTable")); Assert.True(tableSelection.Matches("SpecificSchema", "OtherTable")); Assert.False(tableSelection.Matches("OtherSchema", "OtherTable")); Assert.False(tableSelection.Matches(TableSelection.Any, "SpecificTable")); Assert.True(tableSelection.Matches("SpecificSchema", TableSelection.Any)); Assert.False(tableSelection.Matches(TableSelection.Any, TableSelection.Any)); }
public void SpecificSelectionMatchesOnlyThatSchemaAndTable() { var tableSelection = new TableSelection() { Schema = "SpecificSchema", Table = "SpecificTable" }; Assert.True(tableSelection.Matches("SpecificSchema", "SpecificTable")); Assert.False(tableSelection.Matches("OtherSchema", "SpecificTable")); Assert.False(tableSelection.Matches("SpecificSchema", "OtherTable")); Assert.False(tableSelection.Matches("OtherSchema", "OtherTable")); Assert.False(tableSelection.Matches(TableSelection.Any, "SpecificTable")); Assert.False(tableSelection.Matches("SpecificSchema", TableSelection.Any)); Assert.False(tableSelection.Matches(TableSelection.Any, TableSelection.Any)); }