示例#1
0
        private void RunAssertion12(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(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();
        }
示例#2
0
        private void TryAssertion12(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(200, 1, new object[][] { new object[] { "IBM", 25d } });
            expected.AddResultInsert(800, 1, new object[][] { new object[] { "MSFT", 34d } });
            expected.AddResultInsert(1500, 1, new object[][] { new object[] { "IBM", 58d } });
            expected.AddResultInsert(1500, 2, new object[][] { new object[] { "YAH", 59d } });
            expected.AddResultInsert(2100, 1, new object[][] { new object[] { "IBM", 85d } });
            expected.AddResultInsert(3500, 1, new object[][] { new object[] { "YAH", 87d } });
            expected.AddResultInsert(4300, 1, new object[][] { new object[] { "IBM", 109d } });
            expected.AddResultInsert(4900, 1, new object[][] { new object[] { "YAH", 112d } });
            expected.AddResultRemove(5700, 0, new object[][] { new object[] { "IBM", 87d } });
            expected.AddResultInsert(5900, 1, new object[][] { new object[] { "YAH", 88d } });
            expected.AddResultRemove(6300, 0, new object[][] { new object[] { "MSFT", 79d } });
            expected.AddResultRemove(7000, 0, new object[][] { new object[] { "IBM", 54d }, new object[] { "YAH", 54d } });

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

            execution.Execute(false);
        }
        private static void TryAssertion78(
            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, null, null);
            expected.AddResultInsRem(2200, 0, null, null);
            expected.AddResultInsRem(3200, 0, null, null);
            expected.AddResultInsRem(4200, 0, null, null);
            expected.AddResultInsRem(
                5200,
                0,
                new[] {new object[] {109d}, new object[] {112d}},
                new[] {new object[] {109d}});
            expected.AddResultInsRem(
                6200,
                0,
                null,
                new[] {new object[] {112d}});
            expected.AddResultInsRem(7200, 0, null, null);

            var execution = new ResultAssertExecution(stmtText, env, expected);
            execution.Execute(false);
        }
示例#4
0
        private void RunAssertion12(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(200, 1, new object[][] { new object[] { "IBM", 25d } });
            expected.AddResultInsert(800, 1, new object[][] { new object[] { "MSFT", 34d } });
            expected.AddResultInsert(1500, 1, new object[][] { new object[] { "IBM", 58d } });
            expected.AddResultInsert(1500, 2, new object[][] { new object[] { "YAH", 59d } });
            expected.AddResultInsert(2100, 1, new object[][] { new object[] { "IBM", 85d } });
            expected.AddResultInsert(3500, 1, new object[][] { new object[] { "YAH", 87d } });
            expected.AddResultInsert(4300, 1, new object[][] { new object[] { "IBM", 109d } });
            expected.AddResultInsert(4900, 1, new object[][] { new object[] { "YAH", 112d } });
            expected.AddResultRemove(5700, 0, new object[][] { new object[] { "IBM", 87d } });
            expected.AddResultInsert(5900, 1, new object[][] { new object[] { "YAH", 88d } });
            expected.AddResultRemove(6300, 0, new object[][] { new object[] { "MSFT", 79d } });
            expected.AddResultRemove(7000, 0, new object[][] { new object[] { "IBM", 54d }, new object[] { "YAH", 54d } });

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

            execution.Execute(false);
        }
示例#5
0
        private void TryAssertion12(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(200, 1, new[] { new object[] { 25d } }, new[] { new object[] { null } });
            expected.AddResultInsRem(800, 1, new[] { new object[] { 34d } }, new[] { new object[] { 25d } });
            expected.AddResultInsRem(1500, 1, new[] { new object[] { 58d } }, new[] { new object[] { 34d } });
            expected.AddResultInsRem(1500, 2, new[] { new object[] { 59d } }, new[] { new object[] { 58d } });
            expected.AddResultInsRem(2100, 1, new[] { new object[] { 85d } }, new[] { new object[] { 59d } });
            expected.AddResultInsRem(3500, 1, new[] { new object[] { 87d } }, new[] { new object[] { 85d } });
            expected.AddResultInsRem(4300, 1, new[] { new object[] { 109d } }, new[] { new object[] { 87d } });
            expected.AddResultInsRem(4900, 1, new[] { new object[] { 112d } }, new[] { new object[] { 109d } });
            expected.AddResultInsRem(5700, 0, new[] { new object[] { 87d } }, new[] { new object[] { 112d } });
            expected.AddResultInsRem(5900, 1, new[] { new object[] { 88d } }, new[] { new object[] { 87d } });
            expected.AddResultInsRem(6300, 0, new[] { new object[] { 79d } }, new[] { new object[] { 88d } });
            expected.AddResultInsRem(7000, 0, new[] { new object[] { 54d } }, new[] { new object[] { 79d } });

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

            execution.Execute(false);
        }
示例#6
0
        private void RunAssertion34(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(4300, 1, new object[][] { new object[] { "IBM", 109d } });
            expected.AddResultInsert(4900, 1, new object[][] { new object[] { "YAH", 112d } });

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

            execution.Execute(false);
        }
示例#7
0
        private void RunAssertion34(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(4300, 1, new Object[][] { new Object[] { "IBM", 109d } });
            expected.AddResultInsert(4900, 1, new Object[][] { new Object[] { "YAH", 112d } });

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

            execution.Execute();
        }
示例#8
0
        private void RunAssertion34(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(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(false);
        }
        private static void TryAssertion17(
            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(
                200,
                1,
                new[] {new object[] {25d}},
                new[] {new object[] {null}});
            expected.AddResultInsRem(
                1500,
                1,
                new[] {new object[] {58d}},
                new[] {new object[] {34d}});
            expected.AddResultInsRem(
                3500,
                1,
                new[] {new object[] {87d}},
                new[] {new object[] {85d}});
            expected.AddResultInsRem(
                4300,
                1,
                new[] {new object[] {109d}},
                new[] {new object[] {87d}});
            expected.AddResultInsRem(
                5700,
                0,
                new[] {new object[] {87d}},
                new[] {new object[] {112d}});
            expected.AddResultInsRem(
                6300,
                0,
                new[] {new object[] {79d}},
                new[] {new object[] {88d}});

            var execution = new ResultAssertExecution(stmtText, env, expected);
            execution.Execute(false);
        }
示例#10
0
        private void RunAssertion17IStreamOnly(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(200, 1, new object[][] { new object[] { "IBM", 25d } });
            expected.AddResultInsert(1500, 1, new object[][] { new object[] { "IBM", 58d } });
            expected.AddResultInsert(3500, 1, new object[][] { new object[] { "YAH", 87d } });
            expected.AddResultInsert(4300, 1, new object[][] { new object[] { "IBM", 109d } });
            expected.AddResultInsert(5900, 1, new object[][] { new object[] { "YAH", 88d } });

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

            execution.Execute(false);
        }
示例#11
0
        private void RunAssertion17IRStream(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(200, 1, new Object[][] { new Object[] { "IBM", 25d } });
            expected.AddResultInsert(1500, 1, new Object[][] { new Object[] { "IBM", 58d } });
            expected.AddResultInsert(3500, 1, new Object[][] { new Object[] { "YAH", 87d } });
            expected.AddResultInsert(4300, 1, new Object[][] { new Object[] { "IBM", 109d } });
            expected.AddResultRemove(5700, 0, new Object[][] { new Object[] { "IBM", 87d } });
            expected.AddResultRemove(6300, 0, new Object[][] { new Object[] { "MSFT", 79d } });

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

            execution.Execute();
        }
示例#12
0
        private void TryAssertion17IStreamOnly(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(200, 1, new object[][] { new object[] { "IBM", 25d } });
            expected.AddResultInsert(1500, 1, new object[][] { new object[] { "IBM", 58d } });
            expected.AddResultInsert(3500, 1, new object[][] { new object[] { "YAH", 87d } });
            expected.AddResultInsert(4300, 1, new object[][] { new object[] { "IBM", 109d } });
            expected.AddResultInsert(5900, 1, new object[][] { new object[] { "YAH", 88d } });

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

            execution.Execute(false);
        }
示例#13
0
        private void RunAssertion78(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, null, null);
            expected.AddResultInsRem(2200, 0, null, null);
            expected.AddResultInsRem(3200, 0, null, null);
            expected.AddResultInsRem(4200, 0, null, null);
            expected.AddResultInsRem(5200, 0, new Object[][] { new Object[] { 109d }, new Object[] { 112d } }, new Object[][] { new Object[] { 109d } });
            expected.AddResultInsRem(6200, 0, null, new Object[][] { new Object[] { 112d } });
            expected.AddResultInsRem(7200, 0, null, null);

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

            execution.Execute();
        }
示例#14
0
        private void RunAssertion13_14(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[] { "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 } });

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

            execution.Execute(false);
        }
示例#15
0
        private void RunAssertion56(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[] { 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(false);
        }
示例#16
0
        private void RunAssertion56(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[] { "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 } });

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

            execution.Execute();
        }
示例#17
0
        private void TryAssertion78(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.AddResultInsRem(1200, 0, null, null);
            expected.AddResultInsRem(2200, 0, null, null);
            expected.AddResultInsRem(3200, 0, null, null);
            expected.AddResultInsRem(4200, 0, null, null);
            expected.AddResultInsRem(5200, 0, new object[][] { new object[] { "IBM", 109d }, new object[] { "YAH", 112d } }, null);
            expected.AddResultInsRem(6200, 0, null, null);
            expected.AddResultInsRem(7200, 0, null, null);

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

            execution.Execute(false);
        }