public async Task GetUserTokenAsyncWithNullConnectionNameShouldThrow() { var credentials = new TestCredentials(); var userToken = new UserTokenClientImpl(AppId, credentials, OauthEndpoint, null, null); await Assert.ThrowsAsync <ArgumentNullException>(async() => { await userToken.GetUserTokenAsync(UserId, null, ChannelId, MagicCode, CancellationToken.None); }); }
public async Task GetUserTokenAsyncOfDisposedTokenShouldThrow() { var credentials = new TestCredentials(); var userToken = new UserTokenClientImpl(AppId, credentials, OauthEndpoint, null, null); userToken.Dispose(); await Assert.ThrowsAsync <ObjectDisposedException>(async() => { await userToken.GetUserTokenAsync(UserId, ConnectionName, ChannelId, MagicCode, CancellationToken.None); }); }