private void Fixture(IDb4oFixture fixture) { if (null == fixture) { throw new ArgumentNullException("fixture"); } _fixture = fixture; }
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 [] { }) }); }
/// <exception cref="System.Exception"></exception> public void SetUp() { IDb4oFixture _fixture = Fixture(); _fixture.Clean(); Db4oSetupBeforeConfigure(); Configure(_fixture.Config()); _fixture.Open(this); Db4oSetupBeforeStore(); Store(); _fixture.Db().Commit(); _fixture.Close(); _fixture.Open(this); Db4oSetupAfterStore(); }
/// <exception cref="System.Exception"></exception> public void TearDown() { try { Db4oTearDownBeforeClean(); } finally { IDb4oFixture fixture = Fixture(); fixture.Close(); IList uncaughtExceptions = fixture.UncaughtExceptions(); fixture.Clean(); HandleUncaughtExceptions(uncaughtExceptions); } Db4oTearDownAfterClean(); }
private void AssertFixtureConfiguration(IDb4oFixture fixture) { FixtureConfigurationTestCase.MockFixtureConfiguration configuration = new FixtureConfigurationTestCase.MockFixtureConfiguration (); fixture.FixtureConfiguration(configuration); Assert.IsTrue(fixture.Label().EndsWith(" - " + configuration.GetLabel()), "FixtureConfiguration label must be part of Fixture label." ); new TestRunner(new Db4oTestSuiteBuilder(fixture, new Type[] { typeof(FixtureConfigurationTestCase.TestCase1 ), typeof(FixtureConfigurationTestCase.TestCase2) })).Run(new TestResult()); configuration.Verify(new MethodCall[] { new MethodCall("configure", new object[] { MethodCall.Conditions.IsA(typeof(FixtureConfigurationTestCase.TestCase1)), MethodCall .IgnoredArgument }), new MethodCall("configure", new object[] { MethodCall.Conditions .IsA(typeof(FixtureConfigurationTestCase.TestCase1)), MethodCall.IgnoredArgument }), new MethodCall("configure", new object[] { MethodCall.Conditions.IsA(typeof( FixtureConfigurationTestCase.TestCase2)), MethodCall.IgnoredArgument }), new MethodCall ("configure", new object[] { MethodCall.Conditions.IsA(typeof(FixtureConfigurationTestCase.TestCase2 )), MethodCall.IgnoredArgument }) }); }
public Db4oTestSuiteBuilder(IDb4oFixture fixture, Type[] classes) : base(classes) { Fixture(fixture); }
public Db4oTestSuiteBuilder(IDb4oFixture fixture, Type clazz) : this(fixture, new Type[] { clazz }) { }
public Db4oConcurrencyTestSuiteBuilder(IDb4oFixture fixture, Type[] classes) : base (fixture, classes) { }
public Db4oConcurrencyTestSuiteBuilder(IDb4oFixture fixture, Type clazz) : base(fixture , clazz) { }
public Db4oTestSuiteBuilder(IDb4oFixture fixture, Type clazz) : this(fixture, new[] {clazz}) { }