public void TestConstructor2() { MBRLogger logger = new MBRLogger(LogManager.CreateLogger("MyLoggerNamespace")); sdc = new SlashDocCache(logger); Assert.IsTrue(object.ReferenceEquals(UnitTestHelper.GetPrivateField(sdc, "logger"), logger), "Wrong constructor implementation"); }
public void TestAddSlashDocFiles() { MBRLogger logger = new MBRLogger(LogManager.CreateLogger("MyLoggerNamespace")); sdc = new SlashDocCache(logger); sdc.AddSlashDocFiles( new string[] { UnitTestHelper.MOCKXMLPATH, UnitTestHelper.MOCKXMLPATH }); Hashtable tab = (Hashtable)UnitTestHelper.GetPrivateField(sdc, "docs"); Assert.AreEqual(tab.Count, 53, "Wrong AddSlashDocFile implementation."); }
public void TestAddSlashDocFile1() { MBRLogger logger = new MBRLogger(LogManager.CreateLogger("MyLoggerNamespace")); sdc = new SlashDocCache(logger); sdc.AddSlashDocFile("../../noSuch/skunk.xml"); //Check a few entries in the hashtable Hashtable tab = (Hashtable)UnitTestHelper.GetPrivateField(sdc, "docs"); Assert.AreEqual(tab.Count, 0, "Wrong AddSlashDocFile implementation."); }
public void TestAddSlashDocFile() { MBRLogger logger = new MBRLogger(LogManager.CreateLogger("MyLoggerNamespace")); sdc = new SlashDocCache(logger); sdc.AddSlashDocFile(UnitTestHelper.MOCKXMLPATH); //Check a few entries in the hashtable Hashtable tab = (Hashtable)UnitTestHelper.GetPrivateField(sdc, "docs"); Assert.AreEqual(tab.Count, 53, "Wrong AddSlashDocFile implementation."); Assert.IsTrue(tab.ContainsKey("M:MockLibrary.Nested.ClassC.ClassD.#ctor(System.Int32)"), "Wrong AddSlashDocFile implementation."); Assert.IsTrue(tab.ContainsKey("M:MockLibrary.WakeMeUp.AlarmRang(System.Object,System.EventArgs)"), "Wrong AddSlashDocFile implementation."); Assert.IsTrue(tab.ContainsKey("E:MockLibrary.WakeMeUp.Alarm"), "Wrong AddSlashDocFile implementation."); }
public void TestConstructorFail1() { sdc = new SlashDocCache(null); }
public void TearDown() { sdc = null; ConfigManager.GetInstance().Clear(false); }
public void SetUp() { ConfigManager.GetInstance().LoadFile("../../test_files/logger.xml"); sdc = new SlashDocCache(); }