public void RejectedAddScope() { Option <Scope> .Error scope = null !; "When adding new scope".x( async() => { scope = await ManagerClient.AddScope( new Scope { Name = "test", Claims = new[] { "openid" } }, GrantedToken.AccessToken) .ConfigureAwait(false) as Option <Scope> .Error; }); "then error is returned".x(() => { Assert.Equal(HttpStatusCode.Forbidden, scope.Details.Status); }); }