public void RunFailingTest() { MyPythonSuite suite = new MyPythonSuite(); suite.Setup(); PythonFixtureBuilder builder = new PythonFixtureBuilder(suite.Engine); PythonFixture fixture = builder.BuildFixtures()[0]; fixture["testFail"].Execute(); }
public void BuildFixtures() { MyPythonSuite suite = new MyPythonSuite(); suite.Setup(); PythonFixtureBuilder builder = new PythonFixtureBuilder(suite.Engine); List<PythonFixture> fixtures = builder.BuildFixtures(); Assert.AreEqual(1, fixtures.Count); Assert.AreEqual(2, fixtures[0].Count); }
public void RunSetupAndTeardowns() { MyPythonSuite suite = new MyPythonSuite(); suite.Setup(); PythonFixtureBuilder builder = new PythonFixtureBuilder(suite.Engine); PythonFixture fixture = builder.BuildFixtures()[0]; fixture.FixtureSetup(); fixture.Setup(); fixture.Teardown(); fixture.FixtureTeardown(); }
public void RunCase() { // using a suite, make sure we can construct & run a method on the fixture in // the same fashion as we plan to in our implementation of the PythonFixtureBuilder. MyPythonSuite suite = new MyPythonSuite(); suite.Setup(); Object obj = suite.Engine.CreateMethod<Func<object>>("return MyPythonFixture()")(); Assert.IsNotNull(obj); Assert.IsAssignableFrom(typeof (OldInstance), obj); Proc<object> proc = suite.Engine.CreateMethod<Proc<object>>("instance.testPass()", new List<string>(new string[] {"instance"})); Proc proc2 = delegate { proc(obj); }; proc2(); }
public void Setup() { MyPythonSuite suite = new MyPythonSuite(); suite.Setup(); }