Esempio n. 1
0
        public void SetSqlUpdate()
        {
            var mapdoc  = new HbmMapping();
            var hbmJoin = new HbmJoin();
            var mapper  = new JoinMapper(typeof(MyClass), "AA", hbmJoin, mapdoc);

            mapper.SqlUpdate("blah");

            Assert.That(hbmJoin.SqlUpdate, Is.Not.Null);
            Assert.That(hbmJoin.SqlUpdate.Text[0], Is.EqualTo("blah"));
        }
Esempio n. 2
0
        public void SetSqlUpdate()
        {
            var mapdoc  = new HbmMapping();
            var hbmJoin = new HbmJoin();
            var mapper  = new JoinMapper(typeof(MyClass), "AA", hbmJoin, mapdoc);

            mapper.SqlUpdate("blah");

            hbmJoin.SqlUpdate.Should().Not.Be.Null();
            hbmJoin.SqlUpdate.Text[0].Should().Be("blah");
        }
Esempio n. 3
0
        public void SetSqlUpdateWithCheck()
        {
            var mapdoc  = new HbmMapping();
            var hbmJoin = new HbmJoin();
            var mapper  = new JoinMapper(typeof(MyClass), "AA", hbmJoin, mapdoc);

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

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