Ejemplo n.º 1
0
        public override void Run(EPServiceProvider epService)
        {
            var eventTypeMeta = new ConfigurationEventTypeXMLDOM();

            eventTypeMeta.RootElementName = "simpleEvent";
            string schemaUri = SupportContainer.Instance
                               .ResourceManager()
                               .ResolveResourceURL(CLASSLOADER_SCHEMA_URI)
                               .ToString();

            eventTypeMeta.SchemaResource      = schemaUri;
            eventTypeMeta.IsXPathPropertyExpr = true;       // <== note this
            eventTypeMeta.AddNamespacePrefix("ss", "samples:schemas:simpleSchema");
            epService.EPAdministrator.Configuration.AddEventType("TestXMLSchemaType", eventTypeMeta);

            // note class not a fragment
            EPStatement stmtInsert = epService.EPAdministrator.CreateEPL("insert into MyNestedStream select nested1 from TestXMLSchemaType");

            EPAssertionUtil.AssertEqualsAnyOrder(new EventPropertyDescriptor[] {
                new EventPropertyDescriptor("nested1", typeof(XmlNode), null, false, false, false, false, false),
            }, stmtInsert.EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(stmtInsert.EventType);

            EventType type = ((EPServiceProviderSPI)epService).EventAdapterService.GetEventTypeByName("TestXMLSchemaType");

            SupportEventTypeAssertionUtil.AssertConsistency(type);
            Assert.IsNull(type.GetFragmentType("nested1"));
            Assert.IsNull(type.GetFragmentType("nested1.nested2"));

            SupportXML.SendDefaultEvent(epService.EPRuntime, "ABC");
            SupportEventTypeAssertionUtil.AssertConsistency(stmtInsert.First());
        }
        public override void Run(EPServiceProvider epService)
        {
            var eventTypeMeta = new ConfigurationEventTypeXMLDOM();

            eventTypeMeta.RootElementName = "simpleEvent";
            // eventTypeMeta.IsXPathPropertyExpr = false; <== the default
            epService.EPAdministrator.Configuration.AddEventType("TestXMLSchemaType", eventTypeMeta);

            EPStatement stmtInsert = epService.EPAdministrator.CreateEPL("insert into MyNestedStream select nested1 from TestXMLSchemaType");

            EPAssertionUtil.AssertEqualsAnyOrder(new EventPropertyDescriptor[] {
                new EventPropertyDescriptor("nested1", typeof(string), typeof(char), false, false, true, false, false),
            }, stmtInsert.EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(stmtInsert.EventType);

            EPStatement stmtSelectWildcard = epService.EPAdministrator.CreateEPL("select * from TestXMLSchemaType");

            EPAssertionUtil.AssertEqualsAnyOrder(new EventPropertyDescriptor[0], stmtSelectWildcard.EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(stmtSelectWildcard.EventType);

            SupportXML.SendDefaultEvent(epService.EPRuntime, "test");
            EventBean stmtInsertWildcardBean = stmtInsert.First();
            EventBean stmtSelectWildcardBean = stmtSelectWildcard.First();

            Assert.IsNotNull(stmtInsertWildcardBean.Get("nested1"));
            SupportEventTypeAssertionUtil.AssertConsistency(stmtSelectWildcardBean);
            SupportEventTypeAssertionUtil.AssertConsistency(stmtInsert.First());

            Assert.AreEqual(0, stmtSelectWildcardBean.EventType.PropertyNames.Length);
        }
Ejemplo n.º 3
0
        private static void RunAssertion(
            RegressionEnvironment env,
            String eventTypeName,
            RegressionPath path)
        {
            env.CompileDeploy("@Name('insert') insert into MyNestedStream select nested1 from " + eventTypeName, path);
            CollectionAssert.AreEquivalent(
                new EventPropertyDescriptor[] {
                    new EventPropertyDescriptor("nested1", typeof(string), typeof(char), false, false, true, false, false)
                },
                env.Statement("insert").EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(env.Statement("insert").EventType);

            env.CompileDeploy("@Name('s0') select * from " + eventTypeName, path);
            CollectionAssert.AreEquivalent(new EventPropertyDescriptor[0], env.Statement("s0").EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(env.Statement("s0").EventType);

            SupportXML.SendDefaultEvent(env.EventService, "test", eventTypeName);
            var stmtInsertWildcardBean = env.GetEnumerator("insert").Advance();
            var stmtSelectWildcardBean = env.GetEnumerator("s0").Advance();
            Assert.IsNotNull(stmtInsertWildcardBean.Get("nested1"));
            SupportEventTypeAssertionUtil.AssertConsistency(stmtSelectWildcardBean);
            SupportEventTypeAssertionUtil.AssertConsistency(env.GetEnumerator("insert").Advance());

            Assert.AreEqual(0, stmtSelectWildcardBean.EventType.PropertyNames.Length);

            env.UndeployAll();
        }
        public override void Run(EPServiceProvider epService)
        {
            // Note that XPath Node results when transposed must be queried by XPath that is also absolute.
            // For example: "nested1" => "/n0:simpleEvent/n0:nested1" results in a Node.
            // That result Node's "prop1" =>  "/n0:simpleEvent/n0:nested1/n0:prop1" and "/n0:nested1/n0:prop1" does NOT result in a value.
            // Therefore property transposal is disabled for Property-XPath expressions.
            var eventTypeMeta = new ConfigurationEventTypeXMLDOM();

            eventTypeMeta.RootElementName = "simpleEvent";
            string schemaUri = SupportContainer.Instance.ResourceManager().ResolveResourceURL(CLASSLOADER_SCHEMA_URI).ToString();

            eventTypeMeta.SchemaResource      = schemaUri;
            eventTypeMeta.IsXPathPropertyExpr = true;       // <== note this
            eventTypeMeta.AddNamespacePrefix("ss", "samples:schemas:simpleSchema");
            epService.EPAdministrator.Configuration.AddEventType("TestXMLSchemaType", eventTypeMeta);

            // note class not a fragment
            EPStatement stmtInsert = epService.EPAdministrator.CreateEPL("insert into MyNestedStream select nested1 from TestXMLSchemaType#lastevent");

            EPAssertionUtil.AssertEqualsAnyOrder(new EventPropertyDescriptor[] {
                new EventPropertyDescriptor("nested1", typeof(XmlNode), null, false, false, false, false, false),
            }, stmtInsert.EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(stmtInsert.EventType);

            EventType type = ((EPServiceProviderSPI)epService).EventAdapterService.GetEventTypeByName("TestXMLSchemaType");

            SupportEventTypeAssertionUtil.AssertConsistency(type);
            Assert.IsNull(type.GetFragmentType("nested1"));
            Assert.IsNull(type.GetFragmentType("nested1.nested2"));

            SupportXML.SendDefaultEvent(epService.EPRuntime, "ABC");
            SupportEventTypeAssertionUtil.AssertConsistency(stmtInsert.First());
        }
        private static void RunAssertion(
            RegressionEnvironment env,
            String eventTypeName,
            RegressionPath path)
        {
            // Note that XPath Node results when transposed must be queried by XPath that is also absolute.
            // For example: "nested1" -> "/n0:simpleEvent/n0:nested1" results in a Node.
            // That result Node's "prop1" ->  "/n0:simpleEvent/n0:nested1/n0:prop1" and "/n0:nested1/n0:prop1" does NOT result in a value.
            // Therefore property transposal is disabled for Property-XPath expressions.

            // note class not a fragment
            env.CompileDeploy("@Name('s0') insert into MyNestedStream select nested1 from " + eventTypeName + "#lastevent", path);
            CollectionAssert.AreEquivalent(
                new EventPropertyDescriptor[] {
                    new EventPropertyDescriptor("nested1", typeof(XmlNode), null, false, false, false, false, false)
                },
                env.Statement("s0").EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(env.Statement("s0").EventType);

            var type = env.Runtime.EventTypeService.GetEventTypePreconfigured(eventTypeName);
            SupportEventTypeAssertionUtil.AssertConsistency(type);
            Assert.IsNull(type.GetFragmentType("nested1"));
            Assert.IsNull(type.GetFragmentType("nested1.Nested2"));

            SupportXML.SendDefaultEvent(env.EventService, "ABC", eventTypeName);
            SupportEventTypeAssertionUtil.AssertConsistency(env.Statement("s0").First());

            env.UndeployAll();
        }
Ejemplo n.º 6
0
        private static void RunAssertion(
            RegressionEnvironment env,
            String eventTypeName,
            RegressionPath path)
        {
            // try array property insert
            env.CompileDeploy("@Name('s0') select nested3.nested4 as narr from " + eventTypeName + "#lastevent", path);
            CollectionAssert.AreEquivalent(
                new EventPropertyDescriptor[] {
                    new EventPropertyDescriptor(
                        "narr",
                        typeof(XmlNode[]),
                        typeof(XmlNode),
                        false,
                        false,
                        true,
                        false,
                        true)
                },
                env.Statement("s0").EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(env.Statement("s0").EventType);

            SupportXML.SendDefaultEvent(env.EventService, "test", eventTypeName);

            var result = env.Statement("s0").First();
            SupportEventTypeAssertionUtil.AssertConsistency(result);
            var fragments = (EventBean[]) result.GetFragment("narr");
            Assert.AreEqual(3, fragments.Length);
            Assert.AreEqual("SAMPLE_V8", fragments[0].Get("prop5[1]"));
            Assert.AreEqual("SAMPLE_V11", fragments[2].Get("prop5[1]"));

            var fragmentItem = (EventBean) result.GetFragment("narr[2]");
            Assert.AreEqual($"{eventTypeName}.nested3.nested4", fragmentItem.EventType.Name);
            Assert.AreEqual("SAMPLE_V10", fragmentItem.Get("prop5[0]"));

            // try array index property insert
            env.CompileDeploy($"@Name('ii') select nested3.nested4[1] as narr from {eventTypeName}#lastevent", path);
            CollectionAssert.AreEquivalent(
                new[] {
                    new EventPropertyDescriptor("narr", typeof(XmlNode), null, false, false, false, false, true)
                },
                env.Statement("ii").EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(env.Statement("ii").EventType);

            SupportXML.SendDefaultEvent(env.EventService, "test", eventTypeName);

            var resultItem = env.GetEnumerator("ii").Advance();
            Assert.That(resultItem.Get("narr.id"), Is.EqualTo("b"));
            SupportEventTypeAssertionUtil.AssertConsistency(resultItem);

            var fragmentsInsertItem = (EventBean) resultItem.GetFragment("narr");
            SupportEventTypeAssertionUtil.AssertConsistency(fragmentsInsertItem);
            Assert.That(fragmentsInsertItem.Get("id"), Is.EqualTo("b"));
            Assert.That(fragmentsInsertItem.Get("prop5[0]"), Is.EqualTo("SAMPLE_V9"));

            env.UndeployAll();
        }
Ejemplo n.º 7
0
        public override void Run(EPServiceProvider epService)
        {
            var schemaURI     = SupportContainer.Instance.ResourceManager().ResolveResourceURL(CLASSLOADER_SCHEMA_URI).ToString();
            var eventTypeMeta = new ConfigurationEventTypeXMLDOM();

            eventTypeMeta.RootElementName = "simpleEvent";
            eventTypeMeta.SchemaResource  = schemaURI;
            epService.EPAdministrator.Configuration.AddEventType("ABCType", eventTypeMeta);

            eventTypeMeta = new ConfigurationEventTypeXMLDOM();
            eventTypeMeta.RootElementName            = "//nested2";
            eventTypeMeta.SchemaResource             = schemaURI;
            eventTypeMeta.IsEventSenderValidatesRoot = false;
            epService.EPAdministrator.Configuration.AddEventType("TestNested2", eventTypeMeta);

            // try array property in select
            var stmtInsert = epService.EPAdministrator.CreateEPL("select * from TestNested2#lastevent");
            var listener   = new SupportUpdateListener();

            stmtInsert.Events += listener.Update;
            EPAssertionUtil.AssertEqualsAnyOrder(new [] {
                new EventPropertyDescriptor("prop3", typeof(int?[]), typeof(int?), false, false, true, false, false),
            }, stmtInsert.EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(stmtInsert.EventType);

            SupportXML.SendDefaultEvent(epService.EPRuntime, "test");
            Assert.IsFalse(listener.IsInvoked);

            var sender = epService.EPRuntime.GetEventSender("TestNested2");

            sender.SendEvent(SupportXML.GetDocument("<nested2><prop3>2</prop3><prop3></prop3><prop3>4</prop3></nested2>"));
            var theEvent = stmtInsert.First();

            EPAssertionUtil.AssertEqualsExactOrder((int?[])theEvent.Get("prop3"), new int?[] { 2, null, 4 });
            SupportEventTypeAssertionUtil.AssertConsistency(theEvent);

            // try array property nested
            var stmtSelect = epService.EPAdministrator.CreateEPL("select nested3.* from ABCType#lastevent");

            SupportXML.SendDefaultEvent(epService.EPRuntime, "test");
            var stmtSelectResult = stmtSelect.First();

            SupportEventTypeAssertionUtil.AssertConsistency(stmtSelectResult);
            Assert.AreEqual(typeof(string[]), stmtSelectResult.EventType.GetPropertyType("nested4[2].prop5"));
            Assert.AreEqual("SAMPLE_V8", stmtSelectResult.Get("nested4[0].prop5[1]"));
            EPAssertionUtil.AssertEqualsExactOrder((string[])stmtSelectResult.Get("nested4[2].prop5"), new object[] { "SAMPLE_V10", "SAMPLE_V11" });

            var fragmentNested4 = (EventBean)stmtSelectResult.GetFragment("nested4[2]");

            EPAssertionUtil.AssertEqualsExactOrder((string[])fragmentNested4.Get("prop5"), new object[] { "SAMPLE_V10", "SAMPLE_V11" });
            Assert.AreEqual("SAMPLE_V11", fragmentNested4.Get("prop5[1]"));
            SupportEventTypeAssertionUtil.AssertConsistency(fragmentNested4);

            epService.EPAdministrator.DestroyAllStatements();
        }
        public override void Run(EPServiceProvider epService)
        {
            var eventTypeMeta = new ConfigurationEventTypeXMLDOM();

            eventTypeMeta.RootElementName = "simpleEvent";
            string schemaUri = SupportContainer.Instance.ResourceManager().ResolveResourceURL(CLASSLOADER_SCHEMA_URI).ToString();

            eventTypeMeta.SchemaResource = schemaUri;
            epService.EPAdministrator.Configuration.AddEventType("TestXMLSchemaType", eventTypeMeta);

            // try array property insert
            EPStatement stmtInsert = epService.EPAdministrator.CreateEPL("select nested3.nested4 as narr from TestXMLSchemaType#lastevent");

            EPAssertionUtil.AssertEqualsAnyOrder(new EventPropertyDescriptor[] {
                new EventPropertyDescriptor("narr", typeof(XmlNode[]), typeof(XmlNode), false, false, true, false, true),
            }, stmtInsert.EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(stmtInsert.EventType);

            SupportXML.SendDefaultEvent(epService.EPRuntime, "test");

            EventBean result = stmtInsert.First();

            SupportEventTypeAssertionUtil.AssertConsistency(result);
            EventBean[] fragments = (EventBean[])result.GetFragment("narr");
            Assert.AreEqual(3, fragments.Length);
            Assert.AreEqual("SAMPLE_V8", fragments[0].Get("prop5[1]"));
            Assert.AreEqual("SAMPLE_V11", fragments[2].Get("prop5[1]"));

            EventBean fragmentItem = (EventBean)result.GetFragment("narr[2]");

            Assert.AreEqual("TestXMLSchemaType.nested3.nested4", fragmentItem.EventType.Name);
            Assert.AreEqual("SAMPLE_V10", fragmentItem.Get("prop5[0]"));

            // try array index property insert
            EPStatement stmtInsertItem = epService.EPAdministrator.CreateEPL("select nested3.nested4[1] as narr from TestXMLSchemaType#lastevent");

            EPAssertionUtil.AssertEqualsAnyOrder(new EventPropertyDescriptor[] {
                new EventPropertyDescriptor("narr", typeof(XmlNode), null, false, false, false, false, true),
            }, stmtInsertItem.EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(stmtInsertItem.EventType);

            SupportXML.SendDefaultEvent(epService.EPRuntime, "test");

            EventBean resultItem = stmtInsertItem.First();

            Assert.AreEqual("b", resultItem.Get("narr.id"));
            SupportEventTypeAssertionUtil.AssertConsistency(resultItem);
            EventBean fragmentsInsertItem = (EventBean)resultItem.GetFragment("narr");

            SupportEventTypeAssertionUtil.AssertConsistency(fragmentsInsertItem);
            Assert.AreEqual("b", fragmentsInsertItem.Get("id"));
            Assert.AreEqual("SAMPLE_V9", fragmentsInsertItem.Get("prop5[0]"));
        }
Ejemplo n.º 9
0
        private static void RunAssertion(
            RegressionEnvironment env,
            String eventTypeNameNested,
            String eventTypeNameABC,
            RegressionPath path)
        {
            // try array property in select
            env.CompileDeploy("@Name('s0') select * from " + eventTypeNameNested + "#lastevent", path).AddListener("s0");

            CollectionAssert.AreEquivalent(
                new EventPropertyDescriptor[] {
                    new EventPropertyDescriptor("prop3", typeof(int?[]), typeof(int?), false, false, true, false, false)
                },
                env.Statement("s0").EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(env.Statement("s0").EventType);

            EventSender sender = env.EventService.GetEventSender(eventTypeNameNested);
            sender.SendEvent(
                SupportXML.GetDocument(
                    "<nested2><prop3>2</prop3><prop3></prop3><prop3>4</prop3></nested2>"));
            var theEvent = env.GetEnumerator("s0").Advance();
            var theValues = theEvent.Get("prop3").Unwrap<object>(true);
            EPAssertionUtil.AssertEqualsExactOrder(
                theValues,
                new object[] {2, null, 4});
            SupportEventTypeAssertionUtil.AssertConsistency(theEvent);
            env.UndeployModuleContaining("s0");

            // try array property nested
            env.CompileDeploy("@Name('s0') select nested3.* from " + eventTypeNameABC + "#lastevent", path);
            SupportXML.SendDefaultEvent(env.EventService, "test", eventTypeNameABC);
            var stmtSelectResult = env.GetEnumerator("s0").Advance();
            SupportEventTypeAssertionUtil.AssertConsistency(stmtSelectResult);
            Assert.AreEqual(typeof(string[]), stmtSelectResult.EventType.GetPropertyType("nested4[2].prop5"));
            Assert.AreEqual("SAMPLE_V8", stmtSelectResult.Get("nested4[0].prop5[1]"));
            EPAssertionUtil.AssertEqualsExactOrder(
                (string[]) stmtSelectResult.Get("nested4[2].prop5"),
                new object[] {"SAMPLE_V10", "SAMPLE_V11"});

            var fragmentNested4 = (EventBean) stmtSelectResult.GetFragment("nested4[2]");
            EPAssertionUtil.AssertEqualsExactOrder(
                (string[]) fragmentNested4.Get("prop5"),
                new object[] {"SAMPLE_V10", "SAMPLE_V11"});
            Assert.AreEqual("SAMPLE_V11", fragmentNested4.Get("prop5[1]"));
            SupportEventTypeAssertionUtil.AssertConsistency(fragmentNested4);

            env.UndeployAll();
        }
Ejemplo n.º 10
0
        public void Run(RegressionEnvironment env)
        {
            // note class not a fragment
            env.CompileDeploy("@Name('s0') insert into MyNestedStream select nested1 from TestXMLSchemaTypeTXG");
            CollectionAssert.AreEquivalent(
                new EventPropertyDescriptor[] {
                    new EventPropertyDescriptor("nested1", typeof(XmlNode), null, false, false, false, false, false)
                },
                env.Statement("s0").EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(env.Statement("s0").EventType);

            var type = env.Runtime.EventTypeService.GetEventTypePreconfigured("TestXMLSchemaTypeTXG");
            SupportEventTypeAssertionUtil.AssertConsistency(type);
            Assert.IsNull(type.GetFragmentType("nested1"));
            Assert.IsNull(type.GetFragmentType("nested1.Nested2"));

            SupportXML.SendDefaultEvent(env.EventService, "ABC", "TestXMLSchemaTypeTXG");
            SupportEventTypeAssertionUtil.AssertConsistency(env.GetEnumerator("s0").Advance());

            env.UndeployAll();
        }
        private void RunAssertionXPathConfigured(string schemaURI, EPServiceProvider epService)
        {
            var rootMeta = new ConfigurationEventTypeXMLDOM();

            rootMeta.RootElementName = "simpleEvent";
            rootMeta.SchemaResource  = schemaURI;
            rootMeta.AddNamespacePrefix("ss", "samples:schemas:simpleSchema");
            rootMeta.AddXPathPropertyFragment("nested1simple", "/ss:simpleEvent/ss:nested1", XPathResultType.Any, "MyNestedEvent");
            rootMeta.AddXPathPropertyFragment("nested4array", "//ss:nested4", XPathResultType.NodeSet, "MyNestedArrayEvent");
            rootMeta.IsAutoFragment = false;
            epService.EPAdministrator.Configuration.AddEventType("MyXMLEvent", rootMeta);

            var metaNested = new ConfigurationEventTypeXMLDOM();

            metaNested.RootElementName = "//nested1";
            metaNested.SchemaResource  = schemaURI;
            metaNested.IsAutoFragment  = false;
            epService.EPAdministrator.Configuration.AddEventType("MyNestedEvent", metaNested);

            var metaNestedArray = new ConfigurationEventTypeXMLDOM();

            metaNestedArray.RootElementName = "//nested4";
            metaNestedArray.SchemaResource  = schemaURI;
            epService.EPAdministrator.Configuration.AddEventType("MyNestedArrayEvent", metaNestedArray);

            EPStatement stmtInsert   = epService.EPAdministrator.CreateEPL("insert into Nested3Stream select nested1simple, nested4array from MyXMLEvent#lastevent");
            EPStatement stmtWildcard = epService.EPAdministrator.CreateEPL("select * from MyXMLEvent#lastevent");

            SupportEventTypeAssertionUtil.AssertConsistency(stmtInsert.EventType);
            SupportEventTypeAssertionUtil.AssertConsistency(stmtWildcard.EventType);
            EPAssertionUtil.AssertEqualsAnyOrder(new EventPropertyDescriptor[] {
                new EventPropertyDescriptor("nested1simple", typeof(XmlNode), null, false, false, false, false, true),
                new EventPropertyDescriptor("nested4array", typeof(XmlNode[]), typeof(XmlNode), false, false, true, false, true),
            }, stmtInsert.EventType.PropertyDescriptors);

            FragmentEventType fragmentTypeNested1 = stmtInsert.EventType.GetFragmentType("nested1simple");

            Assert.IsFalse(fragmentTypeNested1.IsIndexed);
            EPAssertionUtil.AssertEqualsAnyOrder(new EventPropertyDescriptor[] {
                new EventPropertyDescriptor("prop1", typeof(string), typeof(char), false, false, true, false, false),
                new EventPropertyDescriptor("prop2", typeof(bool?), null, false, false, false, false, false),
                new EventPropertyDescriptor("attr1", typeof(string), typeof(char), false, false, true, false, false),
                new EventPropertyDescriptor("nested2", typeof(XmlNode), null, false, false, false, false, false),
            }, fragmentTypeNested1.FragmentType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(fragmentTypeNested1.FragmentType);

            FragmentEventType fragmentTypeNested4 = stmtInsert.EventType.GetFragmentType("nested4array");

            Assert.IsTrue(fragmentTypeNested4.IsIndexed);
            EPAssertionUtil.AssertEqualsAnyOrder(new EventPropertyDescriptor[] {
                new EventPropertyDescriptor("prop5", typeof(string[]), typeof(string), false, false, true, false, false),
                new EventPropertyDescriptor("prop6", typeof(string[]), typeof(string), false, false, true, false, false),
                new EventPropertyDescriptor("prop7", typeof(string[]), typeof(string), false, false, true, false, false),
                new EventPropertyDescriptor("prop8", typeof(string[]), typeof(string), false, false, true, false, false),
                new EventPropertyDescriptor("id", typeof(string), typeof(char), false, false, true, false, false),
            }, fragmentTypeNested4.FragmentType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(fragmentTypeNested4.FragmentType);

            FragmentEventType fragmentTypeNested4Item = stmtInsert.EventType.GetFragmentType("nested4array[0]");

            Assert.IsFalse(fragmentTypeNested4Item.IsIndexed);
            EPAssertionUtil.AssertEqualsAnyOrder(new EventPropertyDescriptor[] {
                new EventPropertyDescriptor("prop5", typeof(string[]), typeof(string), false, false, true, false, false),
                new EventPropertyDescriptor("prop6", typeof(string[]), typeof(string), false, false, true, false, false),
                new EventPropertyDescriptor("prop7", typeof(string[]), typeof(string), false, false, true, false, false),
                new EventPropertyDescriptor("prop8", typeof(string[]), typeof(string), false, false, true, false, false),
                new EventPropertyDescriptor("id", typeof(string), typeof(char), false, false, true, false, false),
            }, fragmentTypeNested4Item.FragmentType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(fragmentTypeNested4Item.FragmentType);

            SupportXML.SendDefaultEvent(epService.EPRuntime, "ABC");

            EventBean received = stmtInsert.First();

            EPAssertionUtil.AssertProps(received, "nested1simple.prop1,nested1simple.prop2,nested1simple.attr1,nested1simple.nested2.prop3[1]".Split(','), new object[] { "SAMPLE_V1", true, "SAMPLE_ATTR1", 4 });
            EPAssertionUtil.AssertProps(received, "nested4array[0].id,nested4array[0].prop5[1],nested4array[1].id".Split(','), new object[] { "a", "SAMPLE_V8", "b" });

            // assert event and fragments alone
            EventBean wildcardStmtEvent = stmtWildcard.First();

            SupportEventTypeAssertionUtil.AssertConsistency(wildcardStmtEvent);

            FragmentEventType eventType = wildcardStmtEvent.EventType.GetFragmentType("nested1simple");

            Assert.IsFalse(eventType.IsIndexed);
            Assert.IsFalse(eventType.IsNative);
            Assert.AreEqual("MyNestedEvent", eventType.FragmentType.Name);
            Assert.IsTrue(wildcardStmtEvent.Get("nested1simple") is XmlNode);
            Assert.AreEqual("SAMPLE_V1", ((EventBean)wildcardStmtEvent.GetFragment("nested1simple")).Get("prop1"));

            eventType = wildcardStmtEvent.EventType.GetFragmentType("nested4array");
            Assert.IsTrue(eventType.IsIndexed);
            Assert.IsFalse(eventType.IsNative);
            Assert.AreEqual("MyNestedArrayEvent", eventType.FragmentType.Name);
            EventBean[] eventsArray = (EventBean[])wildcardStmtEvent.GetFragment("nested4array");
            Assert.AreEqual(3, eventsArray.Length);
            Assert.AreEqual("SAMPLE_V8", eventsArray[0].Get("prop5[1]"));
            Assert.AreEqual("SAMPLE_V9", eventsArray[1].Get("prop5[0]"));
            Assert.AreEqual(typeof(XmlNodeList), wildcardStmtEvent.EventType.GetPropertyType("nested4array"));
            Assert.IsTrue(wildcardStmtEvent.Get("nested4array") is XmlNodeList);

            EventBean nested4arrayItem = (EventBean)wildcardStmtEvent.GetFragment("nested4array[1]");

            Assert.AreEqual("b", nested4arrayItem.Get("id"));

            epService.EPAdministrator.DestroyAllStatements();
        }
Ejemplo n.º 12
0
        internal static void RunAssertion(
            RegressionEnvironment env,
            bool xpath,
            string typeName,
            RegressionPath path)
        {
            var stmtSelectWild = "@Name('s0') select * from " + typeName;
            env.CompileDeploy(stmtSelectWild, path).AddListener("s0");
            var type = env.Statement("s0").EventType;
            SupportEventTypeAssertionUtil.AssertConsistency(type);

            CollectionAssert.AreEquivalent(
                new EventPropertyDescriptor[] {
                    new EventPropertyDescriptor("nested1", typeof(XmlNode), null, false, false, false, false, !xpath),
                    new EventPropertyDescriptor("prop4", typeof(string), typeof(char), false, false, false, false, false),
                    new EventPropertyDescriptor("nested3", typeof(XmlNode), null, false, false, false, false, !xpath),
                    new EventPropertyDescriptor("customProp", typeof(double?), null, false, false, false, false, false)
                },
                type.PropertyDescriptors);
            env.UndeployModuleContaining("s0");

            var stmt = "@Name('s0') select nested1 as nodeProp," +
                       "prop4 as nested1Prop," +
                       "nested1.prop2 as nested2Prop," +
                       "nested3.nested4('a').prop5[1] as complexProp," +
                       "nested1.nested2.prop3[2] as indexedProp," +
                       "customProp," +
                       "prop4.attr2 as attrOneProp," +
                       "nested3.nested4[2].id as attrTwoProp" +
                       " from " +
                       typeName +
                       "#length(100)";

            env.CompileDeploy(stmt, path).AddListener("s0");
            type = env.Statement("s0").EventType;
            SupportEventTypeAssertionUtil.AssertConsistency(type);
            CollectionAssert.AreEquivalent(
                new EventPropertyDescriptor[] {
                    new EventPropertyDescriptor("nodeProp", typeof(XmlNode), null, false, false, false, false, !xpath),
                    new EventPropertyDescriptor("nested1Prop", typeof(string), typeof(char), false, false, true, false, false),
                    new EventPropertyDescriptor("nested2Prop", typeof(bool?), null, false, false, false, false, false),
                    new EventPropertyDescriptor("complexProp", typeof(string), typeof(char), false, false, true, false, false),
                    new EventPropertyDescriptor("indexedProp", typeof(int?), null, false, false, false, false, false),
                    new EventPropertyDescriptor("customProp", typeof(double?), null, false, false, false, false, false),
                    new EventPropertyDescriptor("attrOneProp", typeof(bool?), null, false, false, false, false, false),
                    new EventPropertyDescriptor("attrTwoProp", typeof(string), typeof(char), false, false, true, false, false)
                },
                type.PropertyDescriptors);

            var eventDoc = SupportXML.SendDefaultEvent(env.EventService, "test", typeName);

            Assert.IsNotNull(env.Listener("s0").LastNewData);
            var theEvent = env.Listener("s0").LastNewData[0];

            Assert.AreSame(eventDoc.DocumentElement.ChildNodes.Item(0), theEvent.Get("nodeProp"));
            Assert.AreEqual("SAMPLE_V6", theEvent.Get("nested1Prop"));
            Assert.AreEqual(true, theEvent.Get("nested2Prop"));
            Assert.AreEqual("SAMPLE_V8", theEvent.Get("complexProp"));
            Assert.AreEqual(5, theEvent.Get("indexedProp"));
            Assert.AreEqual(3.0, theEvent.Get("customProp"));
            Assert.AreEqual(true, theEvent.Get("attrOneProp"));
            Assert.AreEqual("c", theEvent.Get("attrTwoProp"));

            env.UndeployAll();
        }
        private static void RunAssertion(
            RegressionEnvironment env,
            String eventTypeName,
            RegressionPath path)
        {
            env.CompileDeploy("@Name('insert') insert into Nested3Stream select nested1simple, nested4array from " + eventTypeName, path);
            env.CompileDeploy("@Name('s0') select * from " + eventTypeName, path);

            SupportEventTypeAssertionUtil.AssertConsistency(env.Statement("insert").EventType);
            SupportEventTypeAssertionUtil.AssertConsistency(env.Statement("s0").EventType);
            CollectionAssert.AreEquivalent(
                new EventPropertyDescriptor[] {
                    new EventPropertyDescriptor(
                        "nested1simple",
                        typeof(XmlNode),
                        null,
                        false,
                        false,
                        false,
                        false,
                        true),
                    new EventPropertyDescriptor(
                        "nested4array",
                        typeof(XmlNode[]),
                        typeof(XmlNode),
                        false,
                        false,
                        true,
                        false,
                        true)
                },
                env.Statement("insert").EventType.PropertyDescriptors);

            var fragmentTypeNested1 = env.Statement("insert").EventType.GetFragmentType("nested1simple");
            Assert.IsFalse(fragmentTypeNested1.IsIndexed);
            Assert.AreEqual(0, fragmentTypeNested1.FragmentType.PropertyDescriptors.Count);
            SupportEventTypeAssertionUtil.AssertConsistency(fragmentTypeNested1.FragmentType);

            var fragmentTypeNested4 = env.Statement("insert").EventType.GetFragmentType("nested4array");
            Assert.IsTrue(fragmentTypeNested4.IsIndexed);
            Assert.AreEqual(0, fragmentTypeNested4.FragmentType.PropertyDescriptors.Count);
            SupportEventTypeAssertionUtil.AssertConsistency(fragmentTypeNested4.FragmentType);

            SupportXML.SendDefaultEvent(env.EventService, "ABC", eventTypeName);

            var received = env.GetEnumerator("insert").Advance();
            EPAssertionUtil.AssertProps(
                received,
                new[] {"nested1simple.prop1", "nested1simple.prop2", "nested1simple.attr1", "nested1simple.nested2.prop3[1]"},
                new object[] {"SAMPLE_V1", "true", "SAMPLE_ATTR1", "4"});
            EPAssertionUtil.AssertProps(
                received,
                new[] {"nested4array[0].id", "nested4array[0].prop5[1]", "nested4array[1].id"},
                new object[] {"a", "SAMPLE_V8", "b"});

            // assert event and fragments alone
            var wildcardStmtEventEnum = env.GetEnumerator("s0");
            Assert.That(wildcardStmtEventEnum.MoveNext(), Is.True);

            var wildcardStmtEvent = wildcardStmtEventEnum.Current;
            SupportEventTypeAssertionUtil.AssertConsistency(wildcardStmtEvent);

            var eventType = wildcardStmtEvent.EventType.GetFragmentType("nested1simple");
            Assert.IsFalse(eventType.IsIndexed);
            Assert.IsFalse(eventType.IsNative);
            Assert.AreEqual("MyNestedEvent", eventType.FragmentType.Name);
            Assert.IsTrue(wildcardStmtEvent.Get("nested1simple") is XmlNode);
            Assert.AreEqual("SAMPLE_V1", ((EventBean) wildcardStmtEvent.GetFragment("nested1simple")).Get("prop1"));

            eventType = wildcardStmtEvent.EventType.GetFragmentType("nested4array");
            Assert.IsTrue(eventType.IsIndexed);
            Assert.IsFalse(eventType.IsNative);
            Assert.AreEqual("MyNestedArrayEvent", eventType.FragmentType.Name);

            var eventsArray = (EventBean[]) wildcardStmtEvent.GetFragment("nested4array");
            Assert.AreEqual(3, eventsArray.Length);
            Assert.AreEqual("SAMPLE_V8", eventsArray[0].Get("prop5[1]"));
            Assert.AreEqual("SAMPLE_V9", eventsArray[1].Get("prop5[0]"));
            Assert.AreEqual(typeof(XmlNodeList), wildcardStmtEvent.EventType.GetPropertyType("nested4array"));
            Assert.IsTrue(wildcardStmtEvent.Get("nested4array") is XmlNodeList);

            env.UndeployAll();
        }
Ejemplo n.º 14
0
        internal static void RunAssertion(EPServiceProvider epService, bool xpath)
        {
            var updateListener = new SupportUpdateListener();

            string      stmtSelectWild = "select * from TestXMLSchemaType";
            EPStatement wildStmt       = epService.EPAdministrator.CreateEPL(stmtSelectWild);
            EventType   type           = wildStmt.EventType;

            SupportEventTypeAssertionUtil.AssertConsistency(type);

            EPAssertionUtil.AssertEqualsAnyOrder(new EventPropertyDescriptor[] {
                new EventPropertyDescriptor("nested1", typeof(XmlNode), null, false, false, false, false, !xpath),
                new EventPropertyDescriptor("prop4", typeof(string), typeof(char), false, false, true, false, false),
                new EventPropertyDescriptor("nested3", typeof(XmlNode), null, false, false, false, false, !xpath),
                new EventPropertyDescriptor("customProp", typeof(double?), null, false, false, false, false, false),
            }, type.PropertyDescriptors);

            string stmt =
                "select nested1 as nodeProp," +
                "prop4 as nested1Prop," +
                "nested1.prop2 as nested2Prop," +
                "nested3.nested4('a').prop5[1] as complexProp," +
                "nested1.nested2.prop3[2] as indexedProp," +
                "customProp," +
                "prop4.attr2 as attrOneProp," +
                "nested3.nested4[2].id as attrTwoProp" +
                " from TestXMLSchemaType#length(100)";

            EPStatement selectStmt = epService.EPAdministrator.CreateEPL(stmt);

            selectStmt.Events += updateListener.Update;
            type = selectStmt.EventType;
            SupportEventTypeAssertionUtil.AssertConsistency(type);
            EPAssertionUtil.AssertEqualsAnyOrder(new EventPropertyDescriptor[] {
                new EventPropertyDescriptor("nodeProp", typeof(XmlNode), null, false, false, false, false, !xpath),
                new EventPropertyDescriptor("nested1Prop", typeof(string), typeof(char), false, false, true, false, false),
                new EventPropertyDescriptor("nested2Prop", typeof(bool?), null, false, false, false, false, false),
                new EventPropertyDescriptor("complexProp", typeof(string), typeof(char), false, false, true, false, false),
                new EventPropertyDescriptor("indexedProp", typeof(int?), null, false, false, false, false, false),
                new EventPropertyDescriptor("customProp", typeof(double?), null, false, false, false, false, false),
                new EventPropertyDescriptor("attrOneProp", typeof(bool?), null, false, false, false, false, false),
                new EventPropertyDescriptor("attrTwoProp", typeof(string), typeof(char), false, false, true, false, false),
            }, type.PropertyDescriptors);

            XmlDocument eventDoc = SupportXML.SendDefaultEvent(epService.EPRuntime, "test");

            Assert.IsNotNull(updateListener.LastNewData);
            EventBean theEvent = updateListener.LastNewData[0];

            Assert.AreSame(eventDoc.DocumentElement.ChildNodes.Item(0), theEvent.Get("nodeProp"));
            Assert.AreEqual("SAMPLE_V6", theEvent.Get("nested1Prop"));
            Assert.AreEqual(true, theEvent.Get("nested2Prop"));
            Assert.AreEqual("SAMPLE_V8", theEvent.Get("complexProp"));
            Assert.AreEqual(5, theEvent.Get("indexedProp"));
            Assert.AreEqual(3.0, theEvent.Get("customProp"));
            Assert.AreEqual(true, theEvent.Get("attrOneProp"));
            Assert.AreEqual("c", theEvent.Get("attrTwoProp"));

            // Comment-in for performance testing
            //          long start = PerformanceObserver.NanoTime;
            //          for (int i = 0; i < 1000; i++)
            //          {
            //          SendEvent("test");
            //          }
            //          long end = PerformanceObserver.NanoTime;
            //          double delta = (end - start) / 1000d / 1000d / 1000d;
            //          Log.Info(delta);
        }
        public override void Run(EPServiceProvider epService)
        {
            var eventTypeMeta = new ConfigurationEventTypeXMLDOM();

            eventTypeMeta.RootElementName = "simpleEvent";
            string schemaUri = SupportContainer.Instance.ResourceManager().ResolveResourceURL(CLASSLOADER_SCHEMA_URI).ToString();

            eventTypeMeta.SchemaResource = schemaUri;
            // eventTypeMeta.IsXPathPropertyExpr = false; <== the default
            epService.EPAdministrator.Configuration.AddEventType("TestXMLSchemaType", eventTypeMeta);

            EPStatement stmtInsert = epService.EPAdministrator.CreateEPL("insert into MyNestedStream select nested1 from TestXMLSchemaType#lastevent");

            EPAssertionUtil.AssertEqualsAnyOrder(new EventPropertyDescriptor[] {
                new EventPropertyDescriptor("nested1", typeof(XmlNode), null, false, false, false, false, true),
            }, stmtInsert.EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(stmtInsert.EventType);

            EPStatement stmtSelect = epService.EPAdministrator.CreateEPL("select nested1.attr1 as attr1, nested1.prop1 as prop1, nested1.prop2 as prop2, nested1.nested2.prop3 as prop3, nested1.nested2.prop3[0] as prop3_0, nested1.nested2 as nested2 from MyNestedStream#lastevent");

            EPAssertionUtil.AssertEqualsAnyOrder(new EventPropertyDescriptor[] {
                new EventPropertyDescriptor("prop1", typeof(string), typeof(char), false, false, true, false, false),
                new EventPropertyDescriptor("prop2", typeof(bool?), null, false, false, false, false, false),
                new EventPropertyDescriptor("attr1", typeof(string), typeof(char), false, false, true, false, false),
                new EventPropertyDescriptor("prop3", typeof(int?[]), typeof(int?), false, false, true, false, false),
                new EventPropertyDescriptor("prop3_0", typeof(int?), null, false, false, false, false, false),
                new EventPropertyDescriptor("nested2", typeof(XmlNode), null, false, false, false, false, true),
            }, stmtSelect.EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(stmtSelect.EventType);

            EPStatement stmtSelectWildcard = epService.EPAdministrator.CreateEPL("select * from MyNestedStream");

            EPAssertionUtil.AssertEqualsAnyOrder(new EventPropertyDescriptor[] {
                new EventPropertyDescriptor("nested1", typeof(XmlNode), null, false, false, false, false, true),
            }, stmtSelectWildcard.EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(stmtSelectWildcard.EventType);

            EPStatement stmtInsertWildcard = epService.EPAdministrator.CreateEPL("insert into MyNestedStreamTwo select nested1.* from TestXMLSchemaType#lastevent");

            EPAssertionUtil.AssertEqualsAnyOrder(new EventPropertyDescriptor[] {
                new EventPropertyDescriptor("prop1", typeof(string), typeof(char), false, false, true, false, false),
                new EventPropertyDescriptor("prop2", typeof(bool?), null, false, false, false, false, false),
                new EventPropertyDescriptor("attr1", typeof(string), typeof(char), false, false, true, false, false),
                new EventPropertyDescriptor("nested2", typeof(XmlNode), null, false, false, false, false, true),
            }, stmtInsertWildcard.EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(stmtInsertWildcard.EventType);

            SupportXML.SendDefaultEvent(epService.EPRuntime, "test");
            EventBean stmtInsertWildcardBean = stmtInsertWildcard.First();

            EPAssertionUtil.AssertProps(stmtInsertWildcardBean, "prop1,prop2,attr1".Split(','),
                                        new object[] { "SAMPLE_V1", true, "SAMPLE_ATTR1" });

            SupportEventTypeAssertionUtil.AssertConsistency(stmtSelect.First());
            EventBean stmtInsertBean = stmtInsert.First();

            SupportEventTypeAssertionUtil.AssertConsistency(stmtInsertWildcard.First());
            SupportEventTypeAssertionUtil.AssertConsistency(stmtInsert.First());

            EventBean fragmentNested1 = (EventBean)stmtInsertBean.GetFragment("nested1");

            Assert.AreEqual(5, fragmentNested1.Get("nested2.prop3[2]"));
            Assert.AreEqual("TestXMLSchemaType.nested1", fragmentNested1.EventType.Name);

            EventBean fragmentNested2 = (EventBean)stmtInsertWildcardBean.GetFragment("nested2");

            Assert.AreEqual(4, fragmentNested2.Get("prop3[1]"));
            Assert.AreEqual("TestXMLSchemaType.nested1.nested2", fragmentNested2.EventType.Name);
        }
        private static void RunAssertion(
            RegressionEnvironment env,
            String eventTypeName,
            RegressionPath path)
        {
            env.CompileDeploy("@Name('s0') insert into MyNestedStream select nested1 from " + eventTypeName + "#lastevent", path);

            CollectionAssert.AreEquivalent(
                new[] {
                    new EventPropertyDescriptor("nested1", typeof(XmlNode), null, false, false, false, false, true)
                },
                env.Statement("s0").EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(env.Statement("s0").EventType);

            env.CompileDeploy(
                "@Name('s1') select nested1.attr1 as attr1, nested1.prop1 as prop1, nested1.prop2 as prop2, nested1.nested2.prop3 as prop3, nested1.nested2.prop3[0] as prop3_0, nested1.nested2 as nested2 from MyNestedStream#lastevent",
                path);
            CollectionAssert.AreEquivalent(
                new EventPropertyDescriptor[] {
                    new EventPropertyDescriptor("prop1", typeof(string), typeof(char), false, false, true, false, false),
                    new EventPropertyDescriptor("prop2", typeof(bool?), null, false, false, false, false, false),
                    new EventPropertyDescriptor("attr1", typeof(string), typeof(char), false, false, true, false, false),
                    new EventPropertyDescriptor(
                        "prop3",
                        typeof(int?[]),
                        typeof(int?),
                        false,
                        false,
                        true,
                        false,
                        false),
                    new EventPropertyDescriptor("prop3_0", typeof(int?), null, false, false, false, false, false),
                    new EventPropertyDescriptor("nested2", typeof(XmlNode), null, false, false, false, false, true)
                },
                env.Statement("s1").EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(env.Statement("s1").EventType);

            env.CompileDeploy("@Name('sw') select * from MyNestedStream", path);
            CollectionAssert.AreEquivalent(
                new EventPropertyDescriptor[] {
                    new EventPropertyDescriptor("nested1", typeof(XmlNode), null, false, false, false, false, true)
                },
                env.Statement("sw").EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(env.Statement("sw").EventType);

            env.CompileDeploy(
                "@Name('iw') insert into MyNestedStreamTwo select nested1.* from " + eventTypeName + "#lastevent",
                path);
            CollectionAssert.AreEquivalent(
                new EventPropertyDescriptor[] {
                    new EventPropertyDescriptor("prop1", typeof(string), typeof(char), false, false, true, false, false),
                    new EventPropertyDescriptor("prop2", typeof(bool?), null, false, false, false, false, false),
                    new EventPropertyDescriptor("attr1", typeof(string), typeof(char), false, false, true, false, false),
                    new EventPropertyDescriptor("nested2", typeof(XmlNode), null, false, false, false, false, true)
                },
                env.Statement("iw").EventType.PropertyDescriptors);
            SupportEventTypeAssertionUtil.AssertConsistency(env.Statement("iw").EventType);

            SupportXML.SendDefaultEvent(env.EventService, "test", eventTypeName);
            var stmtInsertWildcardBean = env.GetEnumerator("iw").Advance();
            EPAssertionUtil.AssertProps(
                stmtInsertWildcardBean,
                new[] {"prop1", "prop2", "attr1"},
                new object[] {"SAMPLE_V1", true, "SAMPLE_ATTR1"});

            SupportEventTypeAssertionUtil.AssertConsistency(env.GetEnumerator("s0").Advance());
            var stmtInsertBean = env.GetEnumerator("s0").Advance();
            SupportEventTypeAssertionUtil.AssertConsistency(env.GetEnumerator("iw").Advance());
            SupportEventTypeAssertionUtil.AssertConsistency(env.GetEnumerator("sw").Advance());

            var fragmentNested1 = (EventBean) stmtInsertBean.GetFragment("nested1");
            Assert.AreEqual(5, fragmentNested1.Get("nested2.prop3[2]"));
            Assert.AreEqual(eventTypeName + ".nested1", fragmentNested1.EventType.Name);

            var fragmentNested2 = (EventBean) stmtInsertWildcardBean.GetFragment("nested2");
            Assert.AreEqual(4, fragmentNested2.Get("prop3[1]"));
            Assert.AreEqual(eventTypeName + ".nested1.nested2", fragmentNested2.EventType.Name);

            env.UndeployAll();
        }