public override void Run(EPServiceProvider epService)
        {
            EventCollection     events       = EventCollectionFactory.GetSetFiveInterfaces();
            var                 testCaseList = new CaseList();
            EventExpressionCase testCase     = null;

            testCase = new EventExpressionCase("c=" + INTERFACE_C);
            testCase.Add("e1", "c", events.GetEvent("e1"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("baseab=" + INTERFACE_BASE_AB);
            testCase.Add("e2", "baseab", events.GetEvent("e2"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_A);
            testCase.Add("e2", "a", events.GetEvent("e2"));
            testCase.Add("e3", "a", events.GetEvent("e3"));
            testCase.Add("e12", "a", events.GetEvent("e12"));
            testCase.Add("e13", "a", events.GetEvent("e13"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_B);
            testCase.Add("e2", "a", events.GetEvent("e2"));
            testCase.Add("e4", "a", events.GetEvent("e4"));
            testCase.Add("e6", "a", events.GetEvent("e6"));
            testCase.Add("e12", "a", events.GetEvent("e12"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_B + "(b='B1')");
            testCase.Add("e2", "a", events.GetEvent("e2"));
            testCase.Add("e4", "a", events.GetEvent("e4"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_A + "(a='A3')");
            testCase.Add("e12", "a", events.GetEvent("e12"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_C + "(c='C2')");
            testCase.Add("e6", "a", events.GetEvent("e6"));
            testCase.Add("e12", "a", events.GetEvent("e12"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_C + "(c='C1')");
            testCase.Add("e1", "a", events.GetEvent("e1"));
            testCase.Add("e2", "a", events.GetEvent("e2"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_D + "(d='D1')");
            testCase.Add("e5", "a", events.GetEvent("e5"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_BASE_D + "(baseD='BaseD')");
            testCase.Add("e5", "a", events.GetEvent("e5"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_BASE_D_BASE + "(baseDBase='BaseDBase')");
            testCase.Add("e5", "a", events.GetEvent("e5"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_D + "(d='D1', baseD='BaseD', baseDBase='BaseDBase')");
            testCase.Add("e5", "a", events.GetEvent("e5"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_BASE_D + "(baseD='BaseD', baseDBase='BaseDBase')");
            testCase.Add("e5", "a", events.GetEvent("e5"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + SUPER_G);
            testCase.Add("e12", "a", events.GetEvent("e12"));
            testCase.Add("e13", "a", events.GetEvent("e13"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + SUPER_G + "(g='G1')");
            testCase.Add("e12", "a", events.GetEvent("e12"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + SUPER_G + "(baseAB='BaseAB5')");
            testCase.Add("e13", "a", events.GetEvent("e13"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + SUPER_G + "(baseAB='BaseAB4', g='G1', a='A3')");
            testCase.Add("e12", "a", events.GetEvent("e12"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + SUPER_G_IMPL + "(baseAB='BaseAB4', g='G1', a='A3', b='B4', c='C2')");
            testCase.Add("e12", "a", events.GetEvent("e12"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_BASE);
            testCase.Add("e8", "a", events.GetEvent("e8"));
            testCase.Add("e9", "a", events.GetEvent("e9"));
            testCase.Add("e10", "a", events.GetEvent("e10"));
            testCase.Add("e11", "a", events.GetEvent("e11"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_ONE);
            testCase.Add("e8", "a", events.GetEvent("e8"));
            testCase.Add("e9", "a", events.GetEvent("e9"));
            testCase.Add("e10", "a", events.GetEvent("e10"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_ONEA);
            testCase.Add("e8", "a", events.GetEvent("e8"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_ONEB);
            testCase.Add("e9", "a", events.GetEvent("e9"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_BASE + "(val='OB1')");
            testCase.Add("e9", "a", events.GetEvent("e9"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_BASE + "(val='O3')");
            testCase.Add("e10", "a", events.GetEvent("e10"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_BASE + "(val='OBase')");
            testCase.Add("e11", "a", events.GetEvent("e11"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_BASE + "(val='O2')");
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_ONE + "(val='OA1')");
            testCase.Add("e8", "a", events.GetEvent("e8"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_ONE + "(val='O3')");
            testCase.Add("e10", "a", events.GetEvent("e10"));
            testCaseList.AddTest(testCase);

            var util = new PatternTestHarness(events, testCaseList, this.GetType());

            util.RunTest(epService);
        }
Пример #2
0
        public void TestInterfacedEvents()
        {
            EventCollection     events       = EventCollectionFactory.GetSetFiveInterfaces();
            CaseList            testCaseList = new CaseList();
            EventExpressionCase testCase     = null;

            testCase = new EventExpressionCase("c=" + INTERFACE_C);
            testCase.Add("e1", "c", events.GetEvent("e1"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("baseab=" + INTERFACE_BASE_AB);
            testCase.Add("e2", "baseab", events.GetEvent("e2"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_A);
            testCase.Add("e2", "a", events.GetEvent("e2"));
            testCase.Add("e3", "a", events.GetEvent("e3"));
            testCase.Add("e12", "a", events.GetEvent("e12"));
            testCase.Add("e13", "a", events.GetEvent("e13"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_B);
            testCase.Add("e2", "a", events.GetEvent("e2"));
            testCase.Add("e4", "a", events.GetEvent("e4"));
            testCase.Add("e6", "a", events.GetEvent("e6"));
            testCase.Add("e12", "a", events.GetEvent("e12"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_B + "(B='B1')");
            testCase.Add("e2", "a", events.GetEvent("e2"));
            testCase.Add("e4", "a", events.GetEvent("e4"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_A + "(A='A3')");
            testCase.Add("e12", "a", events.GetEvent("e12"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_C + "(C='C2')");
            testCase.Add("e6", "a", events.GetEvent("e6"));
            testCase.Add("e12", "a", events.GetEvent("e12"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_C + "(C='C1')");
            testCase.Add("e1", "a", events.GetEvent("e1"));
            testCase.Add("e2", "a", events.GetEvent("e2"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_D + "(D='D1')");
            testCase.Add("e5", "a", events.GetEvent("e5"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_BASE_D + "(BaseD='BaseD')");
            testCase.Add("e5", "a", events.GetEvent("e5"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_BASE_D_BASE + "(BaseDBase='BaseDBase')");
            testCase.Add("e5", "a", events.GetEvent("e5"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_D + "(D='D1', BaseD='BaseD', BaseDBase='BaseDBase')");
            testCase.Add("e5", "a", events.GetEvent("e5"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + INTERFACE_BASE_D + "(BaseD='BaseD', BaseDBase='BaseDBase')");
            testCase.Add("e5", "a", events.GetEvent("e5"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + SUPER_G);
            testCase.Add("e12", "a", events.GetEvent("e12"));
            testCase.Add("e13", "a", events.GetEvent("e13"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + SUPER_G + "(G='G1')");
            testCase.Add("e12", "a", events.GetEvent("e12"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + SUPER_G + "(BaseAB='BaseAB5')");
            testCase.Add("e13", "a", events.GetEvent("e13"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + SUPER_G + "(BaseAB='BaseAB4', G='G1', A='A3')");
            testCase.Add("e12", "a", events.GetEvent("e12"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + SUPER_G_IMPL + "(BaseAB='BaseAB4', G='G1', A='A3', B='B4', C='C2')");
            testCase.Add("e12", "a", events.GetEvent("e12"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_BASE);
            testCase.Add("e8", "a", events.GetEvent("e8"));
            testCase.Add("e9", "a", events.GetEvent("e9"));
            testCase.Add("e10", "a", events.GetEvent("e10"));
            testCase.Add("e11", "a", events.GetEvent("e11"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_ONE);
            testCase.Add("e8", "a", events.GetEvent("e8"));
            testCase.Add("e9", "a", events.GetEvent("e9"));
            testCase.Add("e10", "a", events.GetEvent("e10"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_ONEA);
            testCase.Add("e8", "a", events.GetEvent("e8"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_ONEB);
            testCase.Add("e9", "a", events.GetEvent("e9"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_BASE + "(Val='OB1')");
            testCase.Add("e9", "a", events.GetEvent("e9"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_BASE + "(Val='O3')");
            testCase.Add("e10", "a", events.GetEvent("e10"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_BASE + "(Val='OBase')");
            testCase.Add("e11", "a", events.GetEvent("e11"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_BASE + "(Val='O2')");
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_ONE + "(Val='OA1')");
            testCase.Add("e8", "a", events.GetEvent("e8"));
            testCaseList.AddTest(testCase);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_ONE + "(Val='O3')");
            testCase.Add("e10", "a", events.GetEvent("e10"));
            testCaseList.AddTest(testCase);

            PatternTestHarness util = new PatternTestHarness(events, testCaseList, GetType(), GetType().FullName);

            util.RunTest();
        }
Пример #3
0
        public void Run(RegressionEnvironment env)
        {
            var events = EventCollectionFactory.GetSetFiveInterfaces();
            EventExpressionCase testCase = null;

            testCase = new EventExpressionCase("C=" + INTERFACE_C);
            testCase.Add("e1", "C", events.GetEvent("e1"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("baseab=" + INTERFACE_BASE_AB);
            testCase.Add("e2", "baseab", events.GetEvent("e2"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + INTERFACE_A);
            testCase.Add("e2", "a", events.GetEvent("e2"));
            testCase.Add("e3", "a", events.GetEvent("e3"));
            testCase.Add("e12", "a", events.GetEvent("e12"));
            testCase.Add("e13", "a", events.GetEvent("e13"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + INTERFACE_B);
            testCase.Add("e2", "a", events.GetEvent("e2"));
            testCase.Add("e4", "a", events.GetEvent("e4"));
            testCase.Add("e6", "a", events.GetEvent("e6"));
            testCase.Add("e12", "a", events.GetEvent("e12"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + INTERFACE_B + "(B='B1')");
            testCase.Add("e2", "a", events.GetEvent("e2"));
            testCase.Add("e4", "a", events.GetEvent("e4"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + INTERFACE_A + "(A='A3')");
            testCase.Add("e12", "a", events.GetEvent("e12"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + INTERFACE_C + "(C='C2')");
            testCase.Add("e6", "a", events.GetEvent("e6"));
            testCase.Add("e12", "a", events.GetEvent("e12"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + INTERFACE_C + "(C='C1')");
            testCase.Add("e1", "a", events.GetEvent("e1"));
            testCase.Add("e2", "a", events.GetEvent("e2"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + INTERFACE_D + "(D='D1')");
            testCase.Add("e5", "a", events.GetEvent("e5"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + INTERFACE_BASE_D + "(BaseD='BaseD')");
            testCase.Add("e5", "a", events.GetEvent("e5"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + INTERFACE_BASE_D_BASE + "(BaseDBase='BaseDBase')");
            testCase.Add("e5", "a", events.GetEvent("e5"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase(
                "every a=" + INTERFACE_D + "(D='D1', BaseD='BaseD', BaseDBase='BaseDBase')");
            testCase.Add("e5", "a", events.GetEvent("e5"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase(
                "every a=" + INTERFACE_BASE_D + "(BaseD='BaseD', BaseDBase='BaseDBase')");
            testCase.Add("e5", "a", events.GetEvent("e5"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + SUPER_G);
            testCase.Add("e12", "a", events.GetEvent("e12"));
            testCase.Add("e13", "a", events.GetEvent("e13"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + SUPER_G + "(G='G1')");
            testCase.Add("e12", "a", events.GetEvent("e12"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + SUPER_G + "(BaseAB='BaseAB5')");
            testCase.Add("e13", "a", events.GetEvent("e13"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + SUPER_G + "(BaseAB='BaseAB4', G='G1', A='A3')");
            testCase.Add("e12", "a", events.GetEvent("e12"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase(
                "every a=" + SUPER_G_IMPL + "(BaseAB='BaseAB4', G='G1', A='A3', B='B4', C='C2')");
            testCase.Add("e12", "a", events.GetEvent("e12"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_BASE);
            testCase.Add("e8", "a", events.GetEvent("e8"));
            testCase.Add("e9", "a", events.GetEvent("e9"));
            testCase.Add("e10", "a", events.GetEvent("e10"));
            testCase.Add("e11", "a", events.GetEvent("e11"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_ONE);
            testCase.Add("e8", "a", events.GetEvent("e8"));
            testCase.Add("e9", "a", events.GetEvent("e9"));
            testCase.Add("e10", "a", events.GetEvent("e10"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_ONEA);
            testCase.Add("e8", "a", events.GetEvent("e8"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_ONEB);
            testCase.Add("e9", "a", events.GetEvent("e9"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_BASE + "(Val='OB1')");
            testCase.Add("e9", "a", events.GetEvent("e9"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_BASE + "(Val='O3')");
            testCase.Add("e10", "a", events.GetEvent("e10"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_BASE + "(Val='OBase')");
            testCase.Add("e11", "a", events.GetEvent("e11"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_BASE + "(Val='O2')");

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_ONE + "(Val='OA1')");
            testCase.Add("e8", "a", events.GetEvent("e8"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);

            testCase = new EventExpressionCase("every a=" + OVERRIDE_ONE + "(Val='O3')");
            testCase.Add("e10", "a", events.GetEvent("e10"));

            (new PatternTestHarness(events, testCase, GetType())).RunTest(env);
        }