Exemplo n.º 1
0
        public void DefaultValueTest()
        {
            IrcLoggerConfig uut = new IrcLoggerConfig();

            Assert.IsNull(uut.LogName);
            Assert.IsNull(uut.LogFileLocation);
            Assert.AreEqual(1000, uut.MaxNumberMessagesPerLog);
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
 public void TestSetup()
 {
     this.testConfig                 = new IrcLoggerConfig();
     this.testConfig.LogName         = "TestLog";
     this.testConfig.LogFileLocation = testLogDirectory;
 }