public void DefaultValueTest() { IrcLoggerConfig uut = new IrcLoggerConfig(); Assert.IsNull(uut.LogName); Assert.IsNull(uut.LogFileLocation); Assert.AreEqual(1000, uut.MaxNumberMessagesPerLog); }
public void TestSetup() { this.log = new GenericLogger(); this.log.OnErrorWriteLine += delegate(string s) { Console.Error.WriteLine(s); }; this.testConfig = new IrcLoggerConfig(); this.testConfig.LogName = "TestLog"; this.testConfig.LogFileLocation = testLogDirectory; }
public void LoadTest() { string location = Path.Combine( testFilesPath, "GoodDefault.xml" ); IrcLoggerConfig config = XmlLoader.LoadIrcLoggerConfig(location); Assert.AreEqual("chaskis", config.LogName); Assert.AreEqual("/home/me/logs/ChaskisLogs", config.LogFileLocation); Assert.AreEqual(90, config.MaxNumberMessagesPerLog); }
public void DefaultValueTestNoTags() { string location = Path.Combine( testFilesPath, "NoTags.xml" ); IrcLoggerConfig config = XmlLoader.LoadIrcLoggerConfig(location); Assert.IsNull(config.LogName); Assert.IsNull(config.LogFileLocation); Assert.AreEqual(1000, config.MaxNumberMessagesPerLog); }
public void DefaultValueTestEmptyTags() { string location = Path.Combine( TestHelpers.PluginDir, "IrcLogger", "Config", "SampleIrcLoggerConfig.xml" ); IrcLoggerConfig config = XmlLoader.LoadIrcLoggerConfig(location); // Empty tags result in an empty string, not null. Assert.AreEqual(string.Empty, config.LogName); Assert.AreEqual(string.Empty, config.LogFileLocation); Assert.AreEqual(1000, config.MaxNumberMessagesPerLog); }
public void TestSetup() { this.testConfig = new IrcLoggerConfig(); this.testConfig.LogName = "TestLog"; this.testConfig.LogFileLocation = testLogDirectory; }