public void TestBotTokenDoesNotThrowExceptions(string token)
 {
     // This example token is pulled from the Discord Docs
     // https://discordapp.com/developers/docs/reference#authentication-example-bot-token-authorization-header
     // should not throw any exception
     TokenUtils.ValidateToken(TokenType.Bot, token);
 }
 public void TestNullOrWhitespaceToken(string token)
 {
     // an ArgumentNullException should be thrown, regardless of the TokenType
     Assert.Throws <ArgumentNullException>(() => TokenUtils.ValidateToken(TokenType.Bearer, token));
     Assert.Throws <ArgumentNullException>(() => TokenUtils.ValidateToken(TokenType.Bot, token));
     Assert.Throws <ArgumentNullException>(() => TokenUtils.ValidateToken(TokenType.Webhook, token));
 }
 public void TestBotTokenInvalidThrowsArgumentException(string token)
 {
     Assert.Throws <ArgumentException>(() => TokenUtils.ValidateToken(TokenType.Bot, token));
 }
 public void TestBearerTokenDoesNotThrowExceptions(string token)
 {
     TokenUtils.ValidateToken(TokenType.Bearer, token);
 }
 public void TestWebhookTokenDoesNotThrowExceptions(string token)
 {
     TokenUtils.ValidateToken(TokenType.Webhook, token);
 }
 public void TestUnrecognizedTokenType(int type)
 {
     Assert.Throws <ArgumentException>(() =>
                                       TokenUtils.ValidateToken((TokenType)type, "MTk4NjIyNDgzNDcxOTI1MjQ4.Cl2FMQ.ZnCjm1XVW7vRze4b7Cq4se7kKWs"));
 }