public void SelfProtectionForQuery() { var wi = new WrongImplementation <Foo>(null); Assert.Throws <ArgumentNullException>(() => wi.ListAll()); Assert.Throws <ArgumentNullException>(() => wi.GetPage(3, 1)); }
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()); }