Beispiel #1
0
        public static void RunTest(EventCollection eventCollection, EventExpressionCase caseExpr, Type testClass, String testMethod)
        {
            var caseList = new CaseList();

            caseList.AddTest(caseExpr);

            var patternTestHarness = new PatternTestHarness(eventCollection, caseList, testClass, testMethod);

            patternTestHarness.RunTest();
        }
        public static void RunTest(EventCollection eventCollection, EventExpressionCase caseExpr, Type testClass)
        {
            var caseList = new CaseList();

            caseList.AddTest(caseExpr);

            var config          = SupportConfigFactory.GetConfiguration();
            var serviceProvider = EPServiceProviderManager.GetDefaultProvider(config);

            serviceProvider.Initialize();

            var patternTestHarness = new PatternTestHarness(eventCollection, caseList, testClass);

            patternTestHarness.RunTest(serviceProvider);
        }
        public PatternTestHarness(
            EventCollection sendEventCollection,
            CaseList caseList,
            Type testClass)
        {
            _sendEventCollection = sendEventCollection;
            _caseList            = caseList;
            _testClass           = testClass;

            // Create a listener for each test descriptor
            _listeners = new SupportUpdateListener[_caseList.Count];
            for (int i = 0; i < _listeners.Length; i++)
            {
                _listeners[i] = new SupportUpdateListener();
            }
            _expressions = new EPStatement[_listeners.Length];
        }