public void TestDatabaseLookupListWithNegativeTimeout()
 {
     XmlDatabaseLookupListLoader  loader = new XmlDatabaseLookupListLoader(new DtdLoader(), GetDefClassFactory());
     try
     {
         loader.LoadLookupList(
             @"<databaseLookupList sql=""Source"" timeout=""-1"" />");
         Assert.Fail("Expected to throw an InvalidXmlDefinitionException");
     }
         //---------------Test Result -----------------------
     catch (InvalidXmlDefinitionException ex)
     {
         StringAssert.Contains("invalid integer was assigned to the 'timeout' attribute", ex.Message);
     }
 }
 public void TestDatabaseLookupListWithClassDef()
 {
     XmlDatabaseLookupListLoader loader = new XmlDatabaseLookupListLoader(new DtdLoader(), GetDefClassFactory());
     MyBO.LoadDefaultClassDef();
     ILookupList def =
         loader.LoadLookupList(
             @"<databaseLookupList sql=""Source"" class=""MyBO"" assembly=""Habanero.Test"" />");
     IDatabaseLookupList source = (IDatabaseLookupList)def;
     Assert.AreEqual("MyBO", source.ClassName);
     Assert.AreEqual("Habanero.Test", source.AssemblyName);
     Assert.AreEqual(10000, source.TimeOut);
 }
        public virtual void TestLookupListLoaderConstructors()
        {
            XmlBusinessObjectLookupListLoader bollLoader = new XmlBusinessObjectLookupListLoader(new DtdLoader(), GetDefClassFactory());
            Assert.AreEqual(typeof(XmlBusinessObjectLookupListLoader), bollLoader.GetType());

            XmlDatabaseLookupListLoader dllLoader = new XmlDatabaseLookupListLoader(new DtdLoader(), GetDefClassFactory());
            Assert.AreEqual(typeof(XmlDatabaseLookupListLoader), dllLoader.GetType());
        }