public void RejectedScopeLoad() { Option <Scope> .Error scope = null !; "When requesting existing scope".x( async() => { scope = await ManagerClient.GetScope("test", GrantedToken.AccessToken) .ConfigureAwait(false) as Option <Scope> .Error; }); "then error is returned".x(() => { Assert.Equal(HttpStatusCode.Forbidden, scope.Details.Status); }); }
public void SuccessScopeLoad() { Scope scope = null !; "When requesting existing scope".x( async() => { var response = await ManagerClient.GetScope("test", GrantedToken.AccessToken) .ConfigureAwait(false) as Option <Scope> .Result; scope = response !.Item; Assert.NotNull(scope); }); "then scope information is returned".x(() => { Assert.Equal("test", scope.Name); }); }