public virtual void TestSolo()
 {
     var suite = new Db4oTestSuiteBuilder(new Db4oInMemory(), typeof (
         ExceptionThrowingTestCase));
     var result = new TestResult();
     new TestRunner(suite).Run(result);
     Assert.AreEqual(1, result.Failures.Count);
 }
Ejemplo n.º 2
0
		public virtual void TestSelectiveFixture()
		{
			IDb4oFixture fixture = new FixtureTestCase.ExcludingInMemoryFixture(this);
			IEnumerator tests = new Db4oTestSuiteBuilder(fixture, new Type[] { typeof(AcceptedTestCase
				), typeof(NotAcceptedTestCase) }).GetEnumerator();
			ITest test = NextTest(tests);
			Assert.IsFalse(tests.MoveNext());
			FrameworkTestCase.RunTestAndExpect(test, 0);
		}
Ejemplo n.º 3
0
		private void AssertSimpleDb4o(IDb4oFixture fixture)
		{
			IEnumerator tests = new Db4oTestSuiteBuilder(fixture, typeof(SimpleDb4oTestCase))
				.GetEnumerator();
			ITest test = NextTest(tests);
			MethodCallRecorder recorder = new MethodCallRecorder();
			SimpleDb4oTestCase.RecorderVariable.With(recorder, new _IRunnable_46(test));
			recorder.Verify(new MethodCall[] { new MethodCall("fixture", new object[] { fixture
				 }), new MethodCall("configure", new object[] { MethodCall.IgnoredArgument }), new 
				MethodCall("store", new object[] {  }), new MethodCall("testResultSize", new object
				[] {  }) });
		}
Ejemplo n.º 4
0
 public virtual void TestSelectiveFixture()
 {
     IDb4oFixture fixture = new ExcludingInMemoryFixture(this);
     var tests = new Db4oTestSuiteBuilder(fixture, new[]
     {
         typeof (AcceptedTestCase
             ),
         typeof (NotAcceptedTestCase)
     }).GetEnumerator();
     var test = NextTest(tests);
     Assert.IsFalse(tests.MoveNext());
     FrameworkTestCase.RunTestAndExpect(test, 0);
 }
Ejemplo n.º 5
0
 private void AssertSimpleDb4o(IDb4oFixture fixture)
 {
     var tests = new Db4oTestSuiteBuilder(fixture, typeof (SimpleDb4oTestCase))
         .GetEnumerator();
     var test = NextTest(tests);
     var recorder = new MethodCallRecorder();
     SimpleDb4oTestCase.RecorderVariable.With(recorder, new _IRunnable_46(test));
     recorder.Verify(new[]
     {
         new MethodCall("fixture", new object[]
         {
             fixture
         }),
         new MethodCall("configure", new[] {MethodCall.IgnoredArgument}), new
             MethodCall("store", new object[] {}),
         new MethodCall("testResultSize", new object
             [] {})
     });
 }