Esempio n. 1
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);
        }
Esempio n. 2
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);
        }
Esempio n. 3
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);
        }
Esempio n. 4
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();
        }
Esempio n. 5
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);
        }
Esempio n. 6
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);
        }
Esempio n. 7
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();
        }
Esempio n. 8
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);
        }
Esempio n. 9
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();
        }
Esempio n. 10
0
        private void TryAssertion15_16(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.AddResultInsert(5200, 0, new object[][] { new object[] { "YAH", 112d } });
            expected.AddResultInsRem(6200, 0, null, null);
            expected.AddResultInsRem(7200, 0, null, null);

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

            execution.Execute(false);
        }