public void Run(RegressionEnvironment env)
            {
                var @namespace = NamespaceGenerator.Create();
                var epl        =
                    "create inlined_class \"\"\"\n" +
                    " namespace " + @namespace + " {\n" +
                    "   [" + typeof(ExtensionSingleRowFunctionAttribute).FullName + "(Name=\"multiply\", MethodName=\"Multiply\")]\n" +
                    "   public class MultiplyHelper {\n" +
                    "     public static int Multiply(int a, int b) {\n" +
                    "       return a*b;\n" +
                    "     }\n" +
                    "   }\n" +
                    " }\n" +
                    "\"\"\"\n;" +
                    "@Name('s0') select multiply(IntPrimitive,IntPrimitive) as c0 from SupportBean;\n";

                env.CompileDeploy(epl).AddListener("s0");

                SendAssertIntMultiply(env, 5, 25);

                env.Milestone(0);

                SendAssertIntMultiply(env, 6, 36);

                SupportDeploymentDependencies.AssertEmpty(env, "s0");

                env.UndeployAll();
            }
Esempio n. 2
0
            public void Run(RegressionEnvironment env)
            {
                var ns      = NamespaceGenerator.Create();
                var inlined = INLINEDCLASS_CONCAT.Replace("${NAMESPACE}", ns);

                var epl =
                    "create " + inlined + ";\n" +
                    "@Name('s0') select concat(TheString) as c0 from SupportBean;\n";

                env.CompileDeploy(epl).AddListener("s0");

                SendAssertConcat(env, "A", "A");

                env.Milestone(0);

                SendAssertConcat(env, "B", "A,B");

                SupportDeploymentDependencies.AssertEmpty(env, "s0");

                env.UndeployAll();
            }