Ejemplo n.º 1
0
        public void SelfProtectionForQuery()
        {
            var wi = new WrongImplementation <Foo>(null);

            Assert.Throws <ArgumentNullException>(() => wi.ListAll());
            Assert.Throws <ArgumentNullException>(() => wi.GetPage(3, 1));
        }
Ejemplo n.º 2
0
        public void SelfProtectionForSession()
        {
            var wi = new WrongImplementation <Foo>(DetachedCriteria.For <Foo>());

            Assert.Throws <ArgumentException>(() => wi.ListAll());
        }
        public void SelfProtectionForSession()
        {
            var wi = new WrongImplementation <Foo>(new DetachedQuery("from Foo"));

            Assert.Throws <ArgumentException>(() => wi.ListAll());
        }