예제 #1
0
 public bool Equals(FilterSpecParamEventProp other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(base.Equals(other) && Equals(other._resultEventAsName, _resultEventAsName) && Equals(other._resultEventProperty, _resultEventProperty));
 }
        public void TestGetFilterValue()
        {
            FilterSpecParamEventProp @params = MakeParam("asName", "IntBoxed");

            var eventBean = new SupportBean();

            eventBean.IntBoxed = 1000;
            EventBean theEvent = SupportEventBeanFactory.CreateObject(eventBean);

            MatchedEventMap matchedEvents =
                new MatchedEventMapImpl(new MatchedEventMapMeta(new String[] { "asName" }, false));

            matchedEvents.Add(0, theEvent);

            Assert.AreEqual(1000, @params.GetFilterValue(matchedEvents, null));
        }
        public void TestEquals()
        {
            var @params = new FilterSpecParamEventProp[5];

            @params[0] = MakeParam("a", "IntBoxed");
            @params[1] = MakeParam("b", "IntBoxed");
            @params[2] = MakeParam("a", "IntPrimitive");
            @params[3] = MakeParam("c", "IntPrimitive");
            @params[4] = MakeParam("a", "IntBoxed");

            Assert.AreEqual(@params[0], @params[4]);
            Assert.AreEqual(@params[4], @params[0]);
            Assert.IsFalse(@params[0].Equals(@params[1]));
            Assert.IsFalse(@params[0].Equals(@params[2]));
            Assert.IsFalse(@params[0].Equals(@params[3]));
        }