示例#1
0
        public void ScriptingMatchIncludeSchemaWildcardPostfix()
        {
            IEnumerable <ScriptingObject> results = ScriptingObjectMatcher.Match(
                includeCriteria: new ScriptingObject {
                Schema = "S*"
            },
                excludeCriteria: null,
                includeSchemas: null,
                excludeSchemas: null,
                includeTypes: "Table",
                excludeTypes: "View",
                candidates: TestData);

            Assert.Equal <int>(4, results.Count());
        }
示例#2
0
        public void ScriptingMatchExcludeSchemaAndTypeCriteria()
        {
            IEnumerable <ScriptingObject> results = ScriptingObjectMatcher.Match(
                includeCriteria: null,
                excludeCriteria: new ScriptingObject {
                Type = "View", Schema = "S1"
            },
                includeSchemas: null,
                excludeSchemas: null,
                includeTypes: null,
                excludeTypes: null,
                candidates: TestData);

            Assert.Equal <int>(4, results.Count());
        }
示例#3
0
        public void ScriptingMatchIncludeSchema()
        {
            IEnumerable <ScriptingObject> results = ScriptingObjectMatcher.Match(
                includeCriteria: new ScriptingObject {
                Schema = "S2"
            },
                excludeCriteria: null,
                includeSchemas: null,
                excludeSchemas: null,
                includeTypes: null,
                excludeTypes: null,
                candidates: TestData);

            Assert.Equal <int>(2, results.Count());
        }
示例#4
0
        public void ScriptingMatchExcludeNameAndSchema()
        {
            IEnumerable <ScriptingObject> results = ScriptingObjectMatcher.Match(
                includeCriteria: null,
                excludeCriteria: new ScriptingObject {
                Name = "Table1"
            },
                includeSchemas: null,
                excludeSchemas: "S1",
                includeTypes: null,
                excludeTypes: null,
                candidates: TestData);

            Assert.Equal <int>(1, results.Count());
        }