public void Run(RegressionEnvironment env) { SetupOrPattern( env, "a, a as myAEvent, b, b as myBEvent, a.IntPrimitive as myInt, " + "a.TheString, b.SimpleProperty as simple, b.Indexed[0] as indexed, b.Nested.NestedValue as nestedVal"); object theEvent = SupportBeanComplexProps.MakeDefaultBean(); env.SendEventBean(theEvent); var eventBean = env.Listener("s0").AssertOneGetNewAndReset(); Assert.AreSame(theEvent, eventBean.Get("b")); Assert.AreEqual("Simple", eventBean.Get("simple")); Assert.AreEqual(1, eventBean.Get("indexed")); Assert.AreEqual("NestedValue", eventBean.Get("nestedVal")); Assert.IsNull(eventBean.Get("a")); Assert.IsNull(eventBean.Get("myAEvent")); Assert.IsNull(eventBean.Get("myInt")); Assert.IsNull(eventBean.Get("a.TheString")); var eventTwo = new SupportBean(); eventTwo.IntPrimitive = 2; eventTwo.TheString = "test2"; env.SendEventBean(eventTwo); eventBean = env.Listener("s0").AssertOneGetNewAndReset(); Assert.AreEqual(2, eventBean.Get("myInt")); Assert.AreEqual("test2", eventBean.Get("a.TheString")); Assert.IsNull(eventBean.Get("b")); Assert.IsNull(eventBean.Get("myBEvent")); Assert.IsNull(eventBean.Get("simple")); Assert.IsNull(eventBean.Get("indexed")); Assert.IsNull(eventBean.Get("nestedVal")); env.UndeployAll(); }
private static SupportBean SendBeanEvent( RegressionEnvironment env, string s) { var bean = new SupportBean(); bean.TheString = s; env.SendEventBean(bean); return bean; }
private static SupportBean SendBeanEvent( RegressionEnvironment env, string s, int intPrimitive) { var bean = new SupportBean(); bean.TheString = s; bean.IntPrimitive = intPrimitive; env.SendEventBean(bean); return bean; }
public void Run(RegressionEnvironment env) { SetupSimplePattern(env, "*"); object theEvent = new SupportBean(); env.SendEventBean(theEvent); var eventBean = env.Listener("s0").AssertOneGetNewAndReset(); Assert.AreSame(theEvent, eventBean.Get("a")); env.UndeployAll(); }
public void Run(RegressionEnvironment env) { SetupSimplePattern(env, "a, a as myEvent, a.IntPrimitive as myInt, a.TheString"); var theEvent = new SupportBean(); theEvent.IntPrimitive = 1; theEvent.TheString = "test"; env.SendEventBean(theEvent); var eventBean = env.Listener("s0").AssertOneGetNewAndReset(); Assert.AreSame(theEvent, eventBean.Get("a")); Assert.AreSame(theEvent, eventBean.Get("myEvent")); Assert.AreEqual(1, eventBean.Get("myInt")); Assert.AreEqual("test", eventBean.Get("a.TheString")); env.UndeployAll(); }
public void Run(RegressionEnvironment env) { SetupOrPattern(env, "*"); object theEvent = new SupportBean(); env.SendEventBean(theEvent); var eventBean = env.Listener("s0").AssertOneGetNewAndReset(); Assert.AreSame(theEvent, eventBean.Get("a")); Assert.IsNull(eventBean.Get("b")); theEvent = SupportBeanComplexProps.MakeDefaultBean(); env.SendEventBean(theEvent); eventBean = env.Listener("s0").AssertOneGetNewAndReset(); Assert.AreSame(theEvent, eventBean.Get("b")); Assert.IsNull(eventBean.Get("a")); env.UndeployAll(); }