Exemplo n.º 1
0
 public void Run(RegressionEnvironment env)
 {
     var soda = "@Name('create dataflow full')\n" +
                "create dataflow DFFull\n" +
                "create map schema ABC1 as (col1 int, col2 int),\n" +
                "create map schema ABC2 as (col1 int, col2 int),\n" +
                "MyOperatorOne(instream.one) -> outstream.one {}\n" +
                "MyOperatorTwo(instream.two as IN1, input.three as IN2) -> outstream.one<Test>, outstream.two<EventBean<TestTwo>> {}\n" +
                "MyOperatorThree((instream.two, input.three) as IN1) {}\n" +
                "MyOperatorFour -> teststream {}\n" +
                "MyOperatorFive {\n" +
                "const_str: \"abc\",\n" +
                "somevalue: def*2,\n" +
                "select: (select * from ABC where 1=2),\n" +
                "jsonarr: [\"a\",\"b\"],\n" +
                "jsonobj: {a: \"a\",b: \"b\"}\n" +
                "}\n";
     var model = env.EplToModel(soda);
     EPAssertionUtil.AssertEqualsIgnoreNewline(soda, model.ToEPL(new EPStatementFormatter(true)));
 }
Exemplo n.º 2
0
        public void TestSODA()
        {
            String soda = "@Name('create dataflow full')\n" +
                          "create dataflow DFFull\n" +
                          "create map schema ABC1 as (col1 int, col2 int),\n" +
                          "create map schema ABC2 as (col1 int, col2 int),\n" +
                          "MyOperatorOne(instream.one) -> outstream.one {}\n" +
                          "MyOperatorTwo(instream.two as IN1, input.three as IN2) -> outstream.one<Test>, outstream.two<EventBean<TestTwo>> {}\n" +
                          "MyOperatorThree((instream.two, input.three) as IN1) {}\n" +
                          "MyOperatorFour -> teststream {}\n" +
                          "MyOperatorFive {\n" +
                          "const_str: \"abc\",\n" +
                          "somevalue: def*2,\n" +
                          "select: (select * from ABC where 1=2),\n" +
                          "jsonarr: [\"a\",\"b\"],\n" +
                          "jsonobj: {a: \"a\",b: \"b\"}\n" +
                          "}\n";
            var model = _epService.EPAdministrator.CompileEPL(soda);

            EPAssertionUtil.AssertEqualsIgnoreNewline(soda, model.ToEPL(new EPStatementFormatter(true)));
            _epService.EPAdministrator.Create(model);
        }