Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleSample Code Block
linenumberstrue
    @Test(enabled = true)
    @Parameters({ "appId", "appSecret" })
    public void testGetSpacesAsApp(String appId, String appSecret) throws UnsupportedEncodingException, WWException {
        WWClient client = WWClient.buildClientApplicationAccess(appId, appSecret, new WWAuthenticationEndpoint());
        assert !client.isAuthenticated();
        client.authenticate();
        assert client.isAuthenticated();

       WWGraphQLEndpoint ep = new WWGraphQLEndpoint(client);
        List<? extends Space> spaces = epclient.getSpaces();
        assert (spaces.size() > 0);
    }