Пример #1
0
        public void CanSetSqlInsert()
        {
            var mapdoc  = new HbmMapping();
            var hbmJoin = new HbmJoin();
            var mapper  = new JoinMapper(typeof(MyClass), "AA", hbmJoin, mapdoc);

            mapper.SqlInsert("blah");

            Assert.That(hbmJoin.SqlInsert, Is.Not.Null);
            Assert.That(hbmJoin.SqlInsert.Text[0], Is.EqualTo("blah"));
        }
Пример #2
0
        public void CanSetSqlInsert()
        {
            var mapdoc  = new HbmMapping();
            var hbmJoin = new HbmJoin();
            var mapper  = new JoinMapper(typeof(MyClass), "AA", hbmJoin, mapdoc);

            mapper.SqlInsert("blah");

            hbmJoin.SqlInsert.Should().Not.Be.Null();
            hbmJoin.SqlInsert.Text[0].Should().Be("blah");
        }
Пример #3
0
        public void CanSetSqlInsertWithCheck()
        {
            var mapdoc  = new HbmMapping();
            var hbmJoin = new HbmJoin();
            var mapper  = new JoinMapper(typeof(MyClass), "AA", hbmJoin, mapdoc);

            mapper.SqlInsert("blah", SqlCheck.RowCount);

            Assert.That(hbmJoin.SqlInsert, Is.Not.Null);
            Assert.That(hbmJoin.SqlInsert.Text[0], Is.EqualTo("blah"));
            Assert.That(hbmJoin.SqlInsert.checkSpecified, Is.True);
            Assert.That(hbmJoin.SqlInsert.check, Is.EqualTo(HbmCustomSQLCheck.Rowcount));
        }