Exemplo n.º 1
0
        public override IEnumerable <string> InterceptTestDataSources(DataSourcesBaseAttribute dataSourcesAttribute, IMethodInfo testMethod, IEnumerable <string> contexts)
        {
            var test = ExtractMethod(testMethod);

            //Filter out specific tests
            switch (ExtractMethod(testMethod))
            {
            //Test targets DB2 provider
            case ("SchemaProviderTests", "DB2Test"):
            //Tests have internal logic based on BulkCopyType - Copied to custom tests
            case ("BulkCopyTests", "KeepIdentity_SkipOnInsertTrue"):
            case ("BulkCopyTests", "KeepIdentity_SkipOnInsertFalse"):
            //Tests have property have space - Copied to custom tests
            case ("DynamicColumnsTests", "SqlPropertyNoStoreNonIdentifier"):
            case ("DynamicColumnsTests", "SqlPropertyNoStoreNonIdentifierGrouping"):
            //Test copied to custom to reduce default source row number
            case ("MergeTests", "BigSource"):
            //Tests passing provider specific parameter types - Generic linq2db test - Not applicable
            case ("MergeTests", "TestParametersInListSourceProperty"):
            //Tests active issue with DB2 family ordering NULL last by default - Not applicable
            case ("MergeTests", "SortedMergeResultsIssue"):
            //Too many cases in code - Copied to custom tests
            case ("CharTypesTests", _):
            //Too many changes and cases - Copied to custom tests
            case ("MergeTests", "TestTypesInsertByMerge"):
            case ("MergeTests", "TestMergeTypes"):
            case ("MergeTests", "TestDB2NullsInSource"):
            //Case valid for DB2 but not for DB2i
            case ("Issue792Tests", "TestWithTransactionThrowsFromProvider"):
            //Data not valid for DB2i
            case ("Issue1287Tests", _):
            //Query contains invalid keyword permission
            case ("Issue825Tests", "Test"):
                return(Enumerable.Empty <string>());

            //Access client throws a different exception so it is excluded
            case ("DataContextTests", "ProviderConnectionStringConstructorTest2"):
                return(contexts.Except(TestProvNameDb2i.GetProviders(TestProvNameDb2i.All_AccessClient)));
            }

            return(contexts);
        }
Exemplo n.º 2
0
 public override IEnumerable <string> InterceptDataSources(DataSourcesBaseAttribute dataSourcesAttribute, IEnumerable <string> contexts)
 {
     return(contexts.Concat(TestProvNameDb2i.GetProviders(contexts)));
 }