Beispiel #1
0
        public void TestInsertInlineCustomTypeHandlerV2()
        {
            Other other = new Other();
            other.Int = 99;
            other.Long = 1966;
            other.Bool = true;
            other.Bool2 = false;

            dataMapper.Insert("InsertInlineCustomTypeHandlerV2", other);

            Other anOther = dataMapper.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);
        }
        public void TestDynamicSelectByBool()
        {
            Other other = new Other();
            other.Bool = true;

            Other anOther = dataMapper.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 = dataMapper.QueryForObject("DynamicSelectByBool", other) as Other;

            Assert.IsNotNull(anOther);
            Assert.AreEqual(1, anOther.Int);
            Assert.AreEqual(8888888, anOther.Long);
            Assert.AreEqual(false, anOther.Bool);

        }
Beispiel #3
0
        public void TestJIRA42()
        {
            Other other = new Other();

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

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