Exemplo n.º 1
0
        public void WhenInternalDiscoveryIsEnabledIsValidTestClassShouldReturnTrueForNestedInternalTestClasses()
        {
            var typeValidator = new TypeValidator(this.mockReflectHelper.Object, true);

            this.SetupTestClass();
            Assert.IsTrue(typeValidator.IsValidTestClass(typeof(OuterClass.NestedInternalClass), this.warnings));
        }
Exemplo n.º 2
0
        public void WhenInternalDiscoveryIsEnabledIsValidTestClassShouldNotReportWarningsForNestedInternalTestClasses()
        {
            var typeValidator = new TypeValidator(this.mockReflectHelper.Object, true);

            this.SetupTestClass();
            typeValidator.IsValidTestClass(typeof(OuterClass.NestedInternalClass), this.warnings);
            Assert.AreEqual(0, this.warnings.Count);
        }
Exemplo n.º 3
0
        public void WhenInternalDiscoveryIsEnabledIsValidTestClassShouldReturnFalseForInaccessibleTestClasses()
        {
            var typeValidator = new TypeValidator(this.mockReflectHelper.Object, true);

            var inaccessibleClassType = Assembly.GetExecutingAssembly().GetTypes().First(t => t.Name == "InaccessiblePublicClass");

            this.SetupTestClass();
            Assert.IsFalse(typeValidator.IsValidTestClass(inaccessibleClassType, this.warnings));
        }