public void ToStringReturnsRawPrefix() { var prefix = "[email protected]"; var ircPrefix = new IrcPrefix(prefix); Assert.Equal(prefix, ircPrefix.ToString()); }
public void CanParseSimplePrefix() { var prefix = "Nick123"; var ircPrefix = new IrcPrefix(prefix); Assert.Equal(prefix, ircPrefix.From); }
public void CanParsePrefixWithHost() { var prefix = "*****@*****.**"; var ircPrefix = new IrcPrefix(prefix); Assert.Equal("Nick123", ircPrefix.From); Assert.Equal("host.com", ircPrefix.Host); }
public static bool IsIgnoreMatch(IrcPrefix prefix, IgnoreActions action) { if (prefix == null) { return(false); } return((from ignore in _ignores.Values where ignore.IsMatch(prefix.Prefix, action) select true).Any()); }