private static void Validate( RegressionEnvironment env, string selectClause, string groupByClause, string[] expectedCSV) { var epl = PLAN_CALLBACK_HOOK + " select " + selectClause + ", count(*) from SupportEventABCProp group by " + groupByClause; SupportGroupRollupPlanHook.Reset(); env.Compile(epl); ComparePlan(expectedCSV); env.UndeployAll(); var model = env.EplToModel(epl); Assert.AreEqual(epl, model.ToEPL()); SupportGroupRollupPlanHook.Reset(); model.Annotations.Add(AnnotationPart.NameAnnotation("s0")); env.CompileDeploy(model).AddListener("s0"); ComparePlan(expectedCSV); env.UndeployAll(); }
private void Validate(string selectClause, string groupByClause, string[] expectedCSV) { var epl = PLAN_CALLBACK_HOOK + " select " + selectClause + ", count(*) from ABCProp group by " + groupByClause; SupportGroupRollupPlanHook.Reset(); var stmt = epService.EPAdministrator.CreateEPL(epl); ComparePlan(expectedCSV); stmt.Dispose(); var model = epService.EPAdministrator.CompileEPL(epl); Assert.AreEqual(epl, model.ToEPL()); SupportGroupRollupPlanHook.Reset(); stmt = epService.EPAdministrator.Create(model); ComparePlan(expectedCSV); Assert.AreEqual(epl, stmt.Text); stmt.Dispose(); }