예제 #1
0
        public void OriginNickOnly()
        {
            string origin = "puckipedia";
            IRCMessageOrigin parsed = new IRCMessageOrigin(origin);

            Assert.AreEqual(parsed.Nick, "puckipedia", "Nick parsed incorrectly");
            Assert.AreEqual(parsed.Host, null, "Parsed a host");
            Assert.AreEqual(parsed.User, null, "Parsed a user");

            Assert.AreEqual(origin, parsed.ToString(), "ToString gave wrong answer");
        }
예제 #2
0
        public void OriginHostOnly()
        {
            string origin = "irc.puckipedia.com";
            IRCMessageOrigin parsed = new IRCMessageOrigin(origin);

            Assert.AreEqual(parsed.Nick, null, "Parsed a nick");
            Assert.AreEqual(parsed.Host, "irc.puckipedia.com", "Host parsed incorrectly");
            Assert.AreEqual(parsed.User, null, "Parsed a user");

            Assert.AreEqual(origin, parsed.ToString(), "ToString gave wrong answer");
        }
예제 #3
0
        public void ParsesServerOrigin()
        {
            var parsed = new IRCMessageOrigin("irc.puckipedia.com");

            Assert.AreEqual(parsed.Host, "irc.puckipedia.com");
            Assert.AreEqual(parsed.User, null, "Somehow parsed a user");
            Assert.AreEqual(parsed.Nick, null, "Somehow parsed a nick");
        }
예제 #4
0
        public void ParsesNickOrigin()
        {
            var parsed = new IRCMessageOrigin("puckipedia");

            Assert.AreEqual(parsed.Nick, "puckipedia");
            Assert.AreEqual(parsed.User, null, "Somehow parsed a user");
            Assert.AreEqual(parsed.Host, null, "Somehow parsed a host");
        }