private void ConfigureMeetupApi() { var clientId = Configuration["dotnetnotts-api:ClientId"]; var clientSecret = Configuration["dotnetnotts-api:ClientSecret"]; if (string.IsNullOrWhiteSpace(clientId)) { throw new ArgumentException("ClientId is not set"); } if (string.IsNullOrWhiteSpace(clientSecret)) { throw new ArgumentException("ClientSecret is not set"); } MeetupApi.ConfigureOauth(clientId, clientSecret); }
public void ConfigureOauth_NoClientIdProvided_ShouldThrowArgumentException() => Assert.Throws(typeof(ArgumentException), delegate { MeetupApi.ConfigureOauth("", "ClientSecrect", "RedirectUrl"); });
public void ConfigureOauth_RedirectUrlProvided_ShouldReturnSameValue() { MeetupApi.ConfigureOauth("ClientId", "ClientSecrect", "http://customUrlForTest.com"); Assert.Same("http://customUrlForTest.com", MeetupApi.OauthSettings.RedirectUrl); }
public void ConfigureOauth_NoRedirectUrlProvided_ShouldReturnDefaultValue() { MeetupApi.ConfigureOauth("ClientId", "ClientSecrect"); Assert.Same("https://soydachi.com", MeetupApi.OauthSettings.RedirectUrl); }
public async Task GetStatus_ReturnTrue() { var result = await MeetupApi.GetStatus(); Assert.True(result); }
public async Task Cities() { var result = await MeetupApi.Cities("es", 40.416881, -3.703435, 25); Assert.NotNull(result); }
public async Task Categories_ReturnData() { var result = await MeetupApi.Categories(); Assert.NotNull(result); }