MCPcopy Create free account
hub / github.com/Asana/java-asana / testNotAuthorized

Method testNotAuthorized

src/test/java/com/asana/ErrorsTest.java:11–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9public class ErrorsTest extends AsanaTest
10{
11 @Test(expected = NoAuthorizationError.class)
12 public void testNotAuthorized() throws IOException
13 {
14 dispatcher.registerResponse("GET", "http://app/users/me").code(401).content("{ \"errors\": [{ \"message\": \"Not Authorized\" }]}");
15
16 client.users.me().execute();
17 }
18
19 @Test(expected = InvalidRequestError.class)
20 public void testInvalidRequest() throws IOException

Callers

nothing calls this directly

Calls 5

contentMethod · 0.80
codeMethod · 0.80
registerResponseMethod · 0.80
meMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected