public void ParseChannel_Pass(string channel, ulong id)
        {
            var parsed = MentionUtils.ParseChannel(channel);

            Assert.Equal(id, parsed);

            Assert.True(MentionUtils.TryParseChannel(channel, out ulong result));
            Assert.Equal(id, result);
        }
Example #2
0
 public void ParseChannel_Fail(string channel)
 {
     Assert.Throws <ArgumentException>(() => MentionUtils.ParseChannel(channel));
     Assert.False(MentionUtils.TryParseChannel(channel, out _));
 }
Example #3
0
 public void ParseChannel_Null()
 {
     Assert.Throws <NullReferenceException>(() => MentionUtils.ParseChannel(null));
     Assert.Throws <NullReferenceException>(() => MentionUtils.TryParseChannel(null, out _));
 }