コード例 #1
0
 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 }) });
 }
コード例 #2
0
		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 }) });
		}