예제 #1
0
			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);
		}
예제 #3
0
 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();
		}
예제 #5
0
 public _IClosure4_52(ReflectionTestSuiteBuilder _enclosing, Type clazz)
 {
     this._enclosing = _enclosing;
     this.clazz      = clazz;
 }
예제 #6
0
 public _IFunction4_26(ReflectionTestSuiteBuilder _enclosing)
 {
     this._enclosing = _enclosing;
 }
예제 #7
0
 public _IFunction4_96(ReflectionTestSuiteBuilder _enclosing, Type clazz)
 {
     this._enclosing = _enclosing;
     this.clazz      = clazz;
 }
예제 #8
0
			public _IClosure4_52(ReflectionTestSuiteBuilder _enclosing, Type clazz)
			{
				this._enclosing = _enclosing;
				this.clazz = clazz;
			}
예제 #9
0
			public _IFunction4_26(ReflectionTestSuiteBuilder _enclosing)
			{
				this._enclosing = _enclosing;
			}
예제 #10
0
			public _ITestFactory_143(ReflectionTestSuiteBuilder _enclosing, Type clazz, MethodInfo
				 method)
			{
				this._enclosing = _enclosing;
				this.clazz = clazz;
				this.method = method;
			}
예제 #11
0
			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);
		}