private QueryTreeNullTestType Convert(NullTestType source)
        {
            switch (source)
            {
            case NullTestType.IsNull:
                return(QueryTreeNullTestType.IsNull);

            case NullTestType.IsNotNull:
                return(QueryTreeNullTestType.IsNotNull);
            }
            return(QueryTreeNullTestType.Unkown);
        }
示例#2
0
        public void NullTest()
        {
            var input = new NullTestType();

            input.StrField    = "str value";
            input.IntField    = 255;
            input.NullField   = null;
            input.DoubleField = 50d;

            var output = SerializeDeserialize(input);

            Assert.AreEqual(input.StrField, output.StrField);
            Assert.AreEqual(input.IntField, output.IntField);
            Assert.AreEqual(input.NullField, output.NullField);
            Assert.AreEqual(input.DoubleField, output.DoubleField);
        }