예제 #1
0
        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();
        }
예제 #2
0
        public void RunFailingTest()
        {
            MyPythonSuite suite = new MyPythonSuite();

            suite.Setup();

            PythonFixtureBuilder builder = new PythonFixtureBuilder(suite.Engine);
            PythonFixture        fixture = builder.BuildFixtures()[0];

            fixture["testFail"].Execute();
        }
예제 #3
0
        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);
        }
예제 #4
0
        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();
        }
예제 #5
0
        public void Setup()
        {
            MyPythonSuite suite = new MyPythonSuite();

            suite.Setup();
        }