public void Run() { IEnumerator tests = new ReflectionTestSuiteBuilder(typeof(RunsLifeCycle)).GetEnumerator (); ITest test = (ITest)Iterators.Next(tests); FrameworkTestCase.RunTestAndExpect(test, 1); }
public virtual void TestExceptionInTearDown() { IEnumerator tests = new ReflectionTestSuiteBuilder(typeof(ExceptionInTearDownDoesNotShadowTestCase.RunsWithExceptionInTearDown )).GetEnumerator(); ITest test = (ITest)Iterators.Next(tests); FrameworkTestCase.RunTestAndExpect(test, 1); }
public _ITestFactory_143(ReflectionTestSuiteBuilder _enclosing, Type clazz, MethodInfo method) { this._enclosing = _enclosing; this.clazz = clazz; this.method = method; }
private Exception AssertFailingTestCase(Type expectedError, ReflectionTestSuiteBuilder builder) { IEnumerator tests = builder.GetEnumerator(); FailingTest test = (FailingTest)Iterators.Next(tests); Assert.AreSame(expectedError, test.Error().GetType()); return test.Error(); }
public _IClosure4_52(ReflectionTestSuiteBuilder _enclosing, Type clazz) { this._enclosing = _enclosing; this.clazz = clazz; }
public _IFunction4_26(ReflectionTestSuiteBuilder _enclosing) { this._enclosing = _enclosing; }
public _IFunction4_96(ReflectionTestSuiteBuilder _enclosing, Type clazz) { this._enclosing = _enclosing; this.clazz = clazz; }
public virtual void TestConstructorFailuresAppearAsFailedTestCases() { ReflectionTestSuiteBuilder builder = new ReflectionTestSuiteBuilder(typeof(ReflectionTestSuiteBuilderTestCase.ConstructorThrows )); Assert.AreEqual(2, Iterators.ToArray(builder.GetEnumerator()).Length); }
public virtual void TestUnmarkedTestFixture() { ReflectionTestSuiteBuilder builder = new ReflectionTestSuiteBuilder(typeof(ReflectionTestSuiteBuilderTestCase.NonTestFixture )); AssertFailingTestCase(typeof(ArgumentException), builder); }