public void BasicTest_OneItemOnErrorPath()
        {
            TestPackageExecutor testExecutor = TestPackageExecutor.ExecuteProjectPackage(
                @"FlowTestProjects\ErrorPath\SimpleErrorPathTests.xml",
                "BasicTest_OneItemOnErrorPath");

            Assert.IsTrue(testExecutor.ItemStops[0].State == ItemEvent.StoppedWithError);
            Assert.IsTrue(testExecutor.ItemStops[1].State == ItemEvent.StoppedSuccessful);
        }
Exemplo n.º 2
0
        public void TestStraightLineFirstError()
        {
            TestPackageExecutor testExecutor = TestPackageExecutor.ExecuteProjectPackage(
                @"FlowTestProjects\ErrorContinuation\StraightLine.xml",
                "StraightLineFirstError");

            Assert.IsTrue(testExecutor.ItemStops[0].State == ItemEvent.StoppedWithError);
            Assert.IsTrue(testExecutor.ItemStops[1].State == ItemEvent.StoppedNotExecuted);
            Assert.IsTrue(testExecutor.ItemStops[2].State == ItemEvent.StoppedNotExecuted);
        }
        public static TestPackageExecutor ExecuteProjectPackage(string projectPath, string packageName)
        {
            ApplicationInitializer appInitializer = new ApplicationInitializer();
            Project project = ProjectLoader.LoadFromPath(projectPath, appInitializer);

            TestPackageExecutor testExecutor = new TestPackageExecutor(appInitializer);

            testExecutor.ExecutePackage(project.Packages.Where(t => t.DisplayName == packageName).First(), project.Connections);

            return(testExecutor);
        }
        public void TestComplexTest2()
        {
            TestPackageExecutor testExecutor = TestPackageExecutor.ExecuteProjectPackage(
                @"FlowTestProjects\ErrorContinuation\ComplexTests.xml",
                "ComplexTest2");

            Assert.IsTrue(testExecutor.ItemStops[0].State == ItemEvent.StoppedSuccessful);
            Assert.IsTrue(testExecutor.ItemStops[1].State == ItemEvent.StoppedWithError);
            Assert.IsTrue(testExecutor.ItemStops[2].State == ItemEvent.StoppedSuccessful);
            Assert.IsTrue(testExecutor.ItemStops[3].State == ItemEvent.StoppedNotExecuted);
            Assert.IsTrue(testExecutor.ItemStops[4].State == ItemEvent.StoppedSuccessful);
        }