예제 #1
0
        public void TestFieldExist()
        {
            EventType mySchema = SupportEventTypeFactory.CreateBeanType(typeof(SupportBean));

            Assert.AreEqual(null, PropertyCheckHelper.Exists(mySchema, "LongPrimitive"));
            Assert.IsTrue(PropertyCheckHelper.Exists(mySchema, "dummy") != null);
        }
예제 #2
0
        public void TestCheckLong()
        {
            EventType mySchema = SupportEventTypeFactory.CreateBeanType(typeof(SupportBean));

            Assert.AreEqual(null, PropertyCheckHelper.CheckLong(mySchema, "LongPrimitive"));
            Assert.AreEqual(null, PropertyCheckHelper.CheckLong(mySchema, "LongBoxed"));
            Assert.AreEqual(null, PropertyCheckHelper.CheckLong(mySchema, "LongBoxed"));
            Assert.IsTrue(PropertyCheckHelper.CheckLong(mySchema, "dummy") != null);
            Assert.IsTrue(PropertyCheckHelper.CheckLong(mySchema, "IntPrimitive") != null);
            Assert.IsTrue(PropertyCheckHelper.CheckLong(mySchema, "DoubleBoxed") != null);
        }
예제 #3
0
        public void TestCheckNumeric()
        {
            EventType mySchema = SupportEventTypeFactory.CreateBeanType(typeof(SupportMarketDataBean));

            Assert.IsTrue(PropertyCheckHelper.CheckNumeric(mySchema, "dummy") != null);
            Assert.IsTrue(PropertyCheckHelper.CheckNumeric(mySchema, "Symbol") != null);

            Assert.IsTrue(PropertyCheckHelper.CheckNumeric(mySchema, "Volume") == null);
            Assert.IsTrue(PropertyCheckHelper.CheckNumeric(mySchema, "Price") == null);

            Assert.IsTrue(PropertyCheckHelper.CheckNumeric(mySchema, "dummy", "dummy2") != null);
            Assert.IsTrue(PropertyCheckHelper.CheckNumeric(mySchema, "Symbol", "dummy2") != null);
            Assert.IsTrue(PropertyCheckHelper.CheckNumeric(mySchema, "Symbol", "Price") != null);
            Assert.IsTrue(PropertyCheckHelper.CheckNumeric(mySchema, "Price", "dummy") != null);
            Assert.IsTrue(PropertyCheckHelper.CheckNumeric(mySchema, "dummy", "Price") != null);

            Assert.IsTrue(PropertyCheckHelper.CheckNumeric(mySchema, "Price", "Price") == null);
            Assert.IsTrue(PropertyCheckHelper.CheckNumeric(mySchema, "Price", "Volume") == null);
            Assert.IsTrue(PropertyCheckHelper.CheckNumeric(mySchema, "Volume", "Price") == null);
        }