Ejemplo n.º 1
0
        public void TestCustomTypeHandler()
        {
            Other other = new Other();
            other.Int = 99;
            other.Long = 1966;
            other.Bool = true;
            other.Bool2 = false;

            sqlMap.Insert("InsertCustomTypeHandler", other);

            Other anOther = sqlMap.QueryForObject("SelectByInt", 99) as Other;

            Assert.IsNotNull(anOther);
            Assert.AreEqual(99, anOther.Int);
            Assert.AreEqual(1966, anOther.Long);
            Assert.AreEqual(true, anOther.Bool);
            Assert.AreEqual(false, anOther.Bool2);
        }
Ejemplo n.º 2
0
        public void TestDynamicSelectByBool()
        {
            Other other = new Other();
            other.Bool = true;

            Other anOther = sqlMap.QueryForObject("DynamicSelectByBool", other) as Other;

            Assert.IsNotNull(anOther);
            Assert.AreEqual(2, anOther.Int);
            Assert.AreEqual(9999999999, anOther.Long);
            Assert.AreEqual(true, anOther.Bool);

            other.Bool = false;
            anOther = sqlMap.QueryForObject("DynamicSelectByBool", other) as Other;

            Assert.IsNotNull(anOther);
            Assert.AreEqual(1, anOther.Int);
            Assert.AreEqual(8888888, anOther.Long);
            Assert.AreEqual(false, anOther.Bool);
        }
Ejemplo n.º 3
0
        public void TestJIRA42()
        {
            Other other = new Other();

            other.Int = 100;
            other.Bool = true;
            other.Long = 789456321;

            sqlMap.Insert("InsertBool", other);
        }