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"); }
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"); }
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"); }
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"); }