public DiscordRestClient(DiscordUserProviderOptions options)
        {
            _discordUserProviderOptions = options ?? new DiscordUserProviderOptions();

            _httpClient = new HttpClient
            {
                Timeout = Defaults.HttpClientTimeout
            };
        }
        public void Setup()
        {
            _mockDiscordRestClient = new Mock <IDiscordRestClient>();
            _mockDiscordRestClient.Setup(m => m.ExchangeCode(It.IsAny <string>())).Returns(Task.FromResult(new TokenResponse()));

            _defaultUserResponse = new UserResponse()
            {
                Id       = "id",
                Avatar   = "1234",
                Username = "******"
            };

            _mockDiscordRestClient.Setup(m => m.GetUser(It.IsAny <string>())).Returns(Task.FromResult(_defaultUserResponse));

            var discordOpts = new DiscordUserProviderOptions();

            _userProvider = new DiscordUserProvider(_mockDiscordRestClient.Object);
            _statelessIdentityProvider = new StatelessIdentityProvider();
            _statelessIdentityProvider.RegisterUserProvider(_userProvider);
        }
 public DiscordRestClient(DiscordUserProviderOptions options, HttpClient httpClient)
 {
     _discordUserProviderOptions = options ?? new DiscordUserProviderOptions();
     _httpClient = httpClient ?? throw new ArgumentNullException(nameof(httpClient));
 }