public void SetUp() { ConfigManager.GetInstance().LoadFile("../../test_files/logger.xml"); logger = new MBRLogger(LogManager.CreateLogger("MyLoggerNamespace")); al = new AssemblyLoader(new string[] { UnitTestHelper.REFPATH }, logger); }
public void SetUp() { ConfigManager.GetInstance().LoadFile("../../test_files/logger.xml"); logger = LogManager.CreateLogger("MyLoggerNamespace"); mbrLogger = new MBRLogger(logger); }
public void SetUp() { ConfigManager.GetInstance().LoadFile("../../test_files/logger.xml"); mbrLogger = new MBRLogger(LogManager.CreateLogger("MyLoggerNamespace")); xpr = new XPathResolver(); }
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."); }
/// <summary> /// <para>Creates a new instance of AssemblyLoader with the given set of custom paths /// where to search the desired assembly and the given MBRLogger instance used to log infos, /// warnings or errors. referencePaths can be null indicating that no custom paths are searched.</para> /// </summary> /// <param name="logger">MBRLogger instance used to log infos, warnings or errors</param> /// <param name="referencePaths">set of custom paths where to search the dependent assemblies</param> /// <exception cref="ArgumentNullException">if logger is null</exception> /// <exception cref="ArgumentException">If referencePaths contain null or empty elements.</exception> public AssemblyLoader(string[] referencePaths, MBRLogger logger) : this(referencePaths) { Helper.ValidateNotNull(logger, "logger"); this.logger = logger; }
/// <summary> /// <para>Creates a new instance of SlashDocCache with the given MBRLogger instance.</para> /// </summary> /// <param name="logger">the MBRLogger instance used to log infos, warnings or errors.</param> /// <exception cref="ArgumentNullException">if logger is null.</exception> public SlashDocCache(MBRLogger logger) { Helper.ValidateNotNull(logger, "logger"); this.logger = logger; }
public void TearDown() { al = null; logger = null; ConfigManager.GetInstance().Clear(false); }
public void TestConstructorFail1() { mbrLogger = new MBRLogger(null); }
/// <summary> /// <para>Creates a new instance of XPathResolver with the given MBRLogger instance.</para> /// </summary> /// <param name="logger">the MBRLogger instance used to log infos, warnings or errors.</param> /// <exception cref="ArgumentNullException">if logger is null.</exception> public XPathResolver(MBRLogger logger) { Helper.ValidateNotNull(logger, "logger"); this.logger = logger; }