private static void TryAssertion34(
            RegressionEnvironment env,
            string stmtText,
            string outputLimit)
        {
            SendTimer(env, 0);
            env.CompileDeploy(stmtText).AddListener("s0");

            string[] fields = {"sum(Price)"};
            var expected = new ResultAssertTestResult(CATEGORY, outputLimit, fields);
            expected.AddResultInsRem(
                4300,
                1,
                new[] {new object[] {109d}},
                null);
            expected.AddResultInsRem(
                4900,
                1,
                new[] {new object[] {112d}},
                new[] {new object[] {109d}});
            expected.AddResultInsRem(
                5700,
                0,
                null,
                new[] {new object[] {112d}});

            var execution = new ResultAssertExecution(stmtText, env, expected);
            execution.Execute(false);
        }
Esempio n. 2
0
        private void RunAssertion34(String stmtText, String outputLimit)
        {
            SendTimer(0);
            var stmt = _epService.EPAdministrator.CreateEPL(stmtText);

            stmt.Events += _listener.Update;

            var fields   = new String[] { "sum(Price)" };
            var expected = new ResultAssertTestResult(CATEGORY, outputLimit, fields);

            expected.AddResultInsRem(4300, 1, new Object[][] { new Object[] { 109d } }, null);
            expected.AddResultInsRem(4900, 1, new Object[][] { new Object[] { 112d } }, new Object[][] { new Object[] { 109d } });
            expected.AddResultInsRem(5700, 0, null, new Object[][] { new Object[] { 112d } });

            var execution = new ResultAssertExecution(_epService, stmt, _listener, expected);

            execution.Execute();
        }
Esempio n. 3
0
        private void TryAssertion34(EPServiceProvider epService, string stmtText, string outputLimit)
        {
            SendTimer(epService, 0);
            EPStatement stmt     = epService.EPAdministrator.CreateEPL(stmtText);
            var         listener = new SupportUpdateListener();

            stmt.Events += listener.Update;

            var fields   = new[] { "sum(price)" };
            var expected = new ResultAssertTestResult(CATEGORY, outputLimit, fields);

            expected.AddResultInsRem(4300, 1, new[] { new object[] { 109d } }, null);
            expected.AddResultInsRem(4900, 1, new[] { new object[] { 112d } }, new[] { new object[] { 109d } });
            expected.AddResultInsRem(5700, 0, null, new[] { new object[] { 112d } });

            var execution = new ResultAssertExecution(epService, stmt, listener, expected);

            execution.Execute(false);
        }
Esempio n. 4
0
        private void RunAssertion56(string stmtText, string outputLimit)
        {
            SendTimer(0);
            var stmt = _epService.EPAdministrator.CreateEPL(stmtText);

            stmt.AddListener(_listener);

            var fields   = new string[] { "Symbol", "sum(Price)" };
            var expected = new ResultAssertTestResult(CATEGORY, outputLimit, fields);

            expected.AddResultInsert(1200, 0, new object[][] { new object[] { "IBM", 25d }, new object[] { "MSFT", 34d } });
            expected.AddResultInsert(2200, 0, new object[][] { new object[] { "IBM", 58d }, new object[] { "YAH", 59d }, new object[] { "IBM", 85d } });
            expected.AddResultInsRem(3200, 0, null, null);
            expected.AddResultInsert(4200, 0, new object[][] { new object[] { "YAH", 87d } });
            expected.AddResultInsert(5200, 0, new object[][] { new object[] { "IBM", 109d }, new object[] { "YAH", 112d } });
            expected.AddResultInsRem(6200, 0, new object[][] { new object[] { "YAH", 88d } }, new object[][] { new object[] { "IBM", 87d } });
            expected.AddResultRemove(7200, 0, new object[][] { new object[] { "MSFT", 79d }, new object[] { "IBM", 54d }, new object[] { "YAH", 54d } });

            var execution = new ResultAssertExecution(_epService, stmt, _listener, expected);

            execution.Execute(false);
        }
Esempio n. 5
0
        private void RunAssertion13_14(String stmtText, String outputLimit)
        {
            SendTimer(0);
            EPStatement stmt = _epService.EPAdministrator.CreateEPL(stmtText);

            stmt.Events += _listener.Update;

            String[] fields = new String[] { "Symbol", "sum(Price)" };
            ResultAssertTestResult expected = new ResultAssertTestResult(CATEGORY, outputLimit, fields);

            expected.AddResultInsert(1200, 0, new Object[][] { new Object[] { "MSFT", 34d } });
            expected.AddResultInsert(2200, 0, new Object[][] { new Object[] { "IBM", 85d } });
            expected.AddResultInsRem(3200, 0, null, null);
            expected.AddResultInsert(4200, 0, new Object[][] { new Object[] { "YAH", 87d } });
            expected.AddResultInsert(5200, 0, new Object[][] { new Object[] { "YAH", 112d } });
            expected.AddResultInsRem(6200, 0, new Object[][] { new Object[] { "YAH", 88d } }, new Object[][] { new Object[] { "IBM", 87d } });
            expected.AddResultRemove(7200, 0, new Object[][] { new Object[] { "YAH", 54d } });

            ResultAssertExecution execution = new ResultAssertExecution(_epService, stmt, _listener, expected);

            execution.Execute();
        }
Esempio n. 6
0
        private void TryAssertion56(EPServiceProvider epService, string stmtText, string outputLimit)
        {
            SendTimer(epService, 0);
            EPStatement stmt     = epService.EPAdministrator.CreateEPL(stmtText);
            var         listener = new SupportUpdateListener();

            stmt.Events += listener.Update;

            var fields   = new string[] { "symbol", "sum(price)" };
            var expected = new ResultAssertTestResult(CATEGORY, outputLimit, fields);

            expected.AddResultInsert(1200, 0, new object[][] { new object[] { "IBM", 25d }, new object[] { "MSFT", 34d } });
            expected.AddResultInsert(2200, 0, new object[][] { new object[] { "IBM", 58d }, new object[] { "YAH", 59d }, new object[] { "IBM", 85d } });
            expected.AddResultInsRem(3200, 0, null, null);
            expected.AddResultInsert(4200, 0, new object[][] { new object[] { "YAH", 87d } });
            expected.AddResultInsert(5200, 0, new object[][] { new object[] { "IBM", 109d }, new object[] { "YAH", 112d } });
            expected.AddResultInsRem(6200, 0, new object[][] { new object[] { "YAH", 88d } }, new object[][] { new object[] { "IBM", 87d } });
            expected.AddResultRemove(7200, 0, new object[][] { new object[] { "MSFT", 79d }, new object[] { "IBM", 54d }, new object[] { "YAH", 54d } });

            var execution = new ResultAssertExecution(epService, stmt, listener, expected);

            execution.Execute(false);
        }
        private static void TryAssertion56(
            RegressionEnvironment env,
            string stmtText,
            string outputLimit)
        {
            SendTimer(env, 0);
            env.CompileDeploy(stmtText).AddListener("s0");

            string[] fields = {"sum(Price)"};
            var expected = new ResultAssertTestResult(CATEGORY, outputLimit, fields);
            expected.AddResultInsRem(
                1200,
                0,
                new[] {new object[] {25d}, new object[] {34d}},
                new[] {new object[] {null}, new object[] {25d}});
            expected.AddResultInsRem(
                2200,
                0,
                new[] {new object[] {58d}, new object[] {59d}, new object[] {85d}},
                new[] {new object[] {34d}, new object[] {58d}, new object[] {59d}});
            expected.AddResultInsRem(
                3200,
                0,
                new[] {new object[] {85d}},
                new[] {new object[] {85d}});
            expected.AddResultInsRem(
                4200,
                0,
                new[] {new object[] {87d}},
                new[] {new object[] {85d}});
            expected.AddResultInsRem(
                5200,
                0,
                new[] {new object[] {109d}, new object[] {112d}},
                new[] {new object[] {87d}, new object[] {109d}});
            expected.AddResultInsRem(
                6200,
                0,
                new[] {new object[] {87d}, new object[] {88d}},
                new[] {new object[] {112d}, new object[] {87d}});
            expected.AddResultInsRem(
                7200,
                0,
                new[] {new object[] {79d}, new object[] {54d}},
                new[] {new object[] {88d}, new object[] {79d}});

            var execution = new ResultAssertExecution(stmtText, env, expected);
            execution.Execute(false);
        }
Esempio n. 8
0
        private void RunAssertion56(String stmtText, String outputLimit)
        {
            SendTimer(0);
            var stmt = _epService.EPAdministrator.CreateEPL(stmtText);

            stmt.Events += _listener.Update;

            var fields   = new String[] { "sum(Price)" };
            var expected = new ResultAssertTestResult(CATEGORY, outputLimit, fields);

            expected.AddResultInsRem(1200, 0, new Object[][] { new Object[] { 25d }, new Object[] { 34d } }, new Object[][] { new Object[] { null }, new Object[] { 25d } });
            expected.AddResultInsRem(2200, 0, new Object[][] { new Object[] { 58d }, new Object[] { 59d }, new Object[] { 85d } }, new Object[][] { new Object[] { 34d }, new Object[] { 58d }, new Object[] { 59d } });
            expected.AddResultInsRem(3200, 0, new Object[][] { new Object[] { 85d } }, new Object[][] { new Object[] { 85d } });
            expected.AddResultInsRem(4200, 0, new Object[][] { new Object[] { 87d } }, new Object[][] { new Object[] { 85d } });
            expected.AddResultInsRem(5200, 0, new Object[][] { new Object[] { 109d }, new Object[] { 112d } }, new Object[][] { new Object[] { 87d }, new Object[] { 109d } });
            expected.AddResultInsRem(6200, 0, new Object[][] { new Object[] { 87d }, new Object[] { 88d } }, new Object[][] { new Object[] { 112d }, new Object[] { 87d } });
            expected.AddResultInsRem(7200, 0, new Object[][] { new Object[] { 79d }, new Object[] { 54d } }, new Object[][] { new Object[] { 88d }, new Object[] { 79d } });

            var execution = new ResultAssertExecution(_epService, stmt, _listener, expected);

            execution.Execute();
        }
Esempio n. 9
0
        private void RunAssertion18(string stmtText, string outputLimit)
        {
            SendTimer(0);
            var stmt = epService.EPAdministrator.CreateEPL(stmtText);

            stmt.AddListener(listener);

            var fields   = new string[] { "sum(Price)" };
            var expected = new ResultAssertTestResult(CATEGORY, outputLimit, fields);

            expected.AddResultInsRem(1200, 0, new object[][] { new object[] { 34d } }, null);
            expected.AddResultInsRem(2200, 0, new object[][] { new object[] { 85d } }, null);
            expected.AddResultInsRem(3200, 0, new object[][] { new object[] { 85d } }, null);
            expected.AddResultInsRem(4200, 0, new object[][] { new object[] { 87d } }, null);
            expected.AddResultInsRem(5200, 0, new object[][] { new object[] { 112d } }, null);
            expected.AddResultInsRem(6200, 0, new object[][] { new object[] { 88d } }, null);
            expected.AddResultInsRem(7200, 0, new object[][] { new object[] { 54d } }, null);

            var execution = new ResultAssertExecution(epService, stmt, listener, expected);

            execution.Execute(false);
        }
Esempio n. 10
0
        private void RunAssertion12(string stmtText, string outputLimit)
        {
            SendTimer(0);
            var stmt = epService.EPAdministrator.CreateEPL(stmtText);

            stmt.AddListener(listener);

            var fields   = new string[] { "sum(Price)" };
            var expected = new ResultAssertTestResult(CATEGORY, outputLimit, fields);

            expected.AddResultInsRem(200, 1, new object[][] { new object[] { 25d } }, new object[][] { new object[] { null } });
            expected.AddResultInsRem(800, 1, new object[][] { new object[] { 34d } }, new object[][] { new object[] { 25d } });
            expected.AddResultInsRem(1500, 1, new object[][] { new object[] { 58d } }, new object[][] { new object[] { 34d } });
            expected.AddResultInsRem(1500, 2, new object[][] { new object[] { 59d } }, new object[][] { new object[] { 58d } });
            expected.AddResultInsRem(2100, 1, new object[][] { new object[] { 85d } }, new object[][] { new object[] { 59d } });
            expected.AddResultInsRem(3500, 1, new object[][] { new object[] { 87d } }, new object[][] { new object[] { 85d } });
            expected.AddResultInsRem(4300, 1, new object[][] { new object[] { 109d } }, new object[][] { new object[] { 87d } });
            expected.AddResultInsRem(4900, 1, new object[][] { new object[] { 112d } }, new object[][] { new object[] { 109d } });
            expected.AddResultInsRem(5700, 0, new object[][] { new object[] { 87d } }, new object[][] { new object[] { 112d } });
            expected.AddResultInsRem(5900, 1, new object[][] { new object[] { 88d } }, new object[][] { new object[] { 87d } });
            expected.AddResultInsRem(6300, 0, new object[][] { new object[] { 79d } }, new object[][] { new object[] { 88d } });
            expected.AddResultInsRem(7000, 0, new object[][] { new object[] { 54d } }, new object[][] { new object[] { 79d } });

            var execution = new ResultAssertExecution(epService, stmt, listener, expected);

            execution.Execute(false);
        }