Exemplo n.º 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);
		}
Exemplo n.º 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();
		}
Exemplo n.º 5
0
 public _IClosure4_52(ReflectionTestSuiteBuilder _enclosing, Type clazz)
 {
     this._enclosing = _enclosing;
     this.clazz      = clazz;
 }
Exemplo n.º 6
0
 public _IFunction4_26(ReflectionTestSuiteBuilder _enclosing)
 {
     this._enclosing = _enclosing;
 }
Exemplo n.º 7
0
 public _IFunction4_96(ReflectionTestSuiteBuilder _enclosing, Type clazz)
 {
     this._enclosing = _enclosing;
     this.clazz      = clazz;
 }
Exemplo n.º 8
0
			public _IClosure4_52(ReflectionTestSuiteBuilder _enclosing, Type clazz)
			{
				this._enclosing = _enclosing;
				this.clazz = clazz;
			}
Exemplo n.º 9
0
			public _IFunction4_26(ReflectionTestSuiteBuilder _enclosing)
			{
				this._enclosing = _enclosing;
			}
Exemplo n.º 10
0
			public _ITestFactory_143(ReflectionTestSuiteBuilder _enclosing, Type clazz, MethodInfo
				 method)
			{
				this._enclosing = _enclosing;
				this.clazz = clazz;
				this.method = method;
			}
Exemplo n.º 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);
		}