public void TestInit() { this.mockReflectHelper = new Mock <ReflectHelper>(); this.testMethodValidator = new TestMethodValidator(this.mockReflectHelper.Object); this.warnings = new List <string>(); this.mockMethodInfo = new Mock <MethodInfo>(); this.type = typeof(TestMethodValidatorTests); }
public void WhenDiscoveryOfInternalsIsEnabledIsValidTestMethodShouldReturnFalseForPrivateMethods() { this.SetupTestMethod(); var methodInfo = typeof(DummyTestClass).GetMethod( "PrivateTestMethod", BindingFlags.Instance | BindingFlags.NonPublic); var testMethodValidator = new TestMethodValidator(this.mockReflectHelper.Object, true); Assert.IsFalse(testMethodValidator.IsValidTestMethod(methodInfo, typeof(DummyTestClass), this.warnings)); }