Пример #1
0
            public MefFactTestCase(IMessageSink diagnosticMessageSink, TestMethodDisplay defaultMethodDisplay, ITestMethod testMethod, IAttributeInfo factAttributeInfo)
                : base(diagnosticMessageSink, defaultMethodDisplay, testMethod)
            {
                var factAttribute = MefFactAttribute.Instantiate(factAttributeInfo);

                this.SkipReason           = factAttribute.Skip;
                this.parts                = factAttribute.Parts;
                this.assemblies           = factAttribute.Assemblies;
                this.compositionVersions  = factAttribute.CompositionVersions;
                this.noCompatGoal         = factAttribute.NoCompatGoal;
                this.invalidConfiguration = factAttribute.InvalidConfiguration;
            }
Пример #2
0
            public MefFactTestCase(IMessageSink diagnosticMessageSink, TestMethodDisplay defaultMethodDisplay, ITestMethod testMethod, IAttributeInfo factAttributeInfo)
                : base(diagnosticMessageSink, defaultMethodDisplay, testMethod)
            {
                var factAttribute = MefFactAttribute.Instantiate(factAttributeInfo);

                this.SkipReason           = factAttribute.Skip;
                this.parts                = factAttribute.Parts;
                this.assemblies           = factAttribute.Assemblies;
                this.compositionVersions  = factAttribute.CompositionVersions;
                this.noCompatGoal         = factAttribute.NoCompatGoal;
                this.invalidConfiguration = factAttribute.InvalidConfiguration;

                if (this.Traits.ContainsKey(Tests.Traits.SkipOnMono) && TestUtilities.IsOnMono)
                {
                    this.SkipReason = this.SkipReason ?? "Test marked as skipped on Mono runtime due to unsupported feature: " + string.Join(", ", this.Traits[Tests.Traits.SkipOnMono]);
                }

                if (this.Traits.ContainsKey(Tests.Traits.SkipOnCoreCLR) && TestUtilities.IsOnCoreCLR)
                {
                    this.SkipReason = this.SkipReason ?? "Test marked as skipped on CoreCLR runtime due to unsupported feature: " + string.Join(", ", this.Traits[Tests.Traits.SkipOnCoreCLR]);
                }
            }