projects
/
facebook-errors
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clearified intend in GraphApiErrorResponseErrorHandlerIntegrationTest
[facebook-errors]
/
src
/
test
/
java
/
de
/
juplo
/
facebook
/
errors
/
GraphApiErrorResponseErrorHandlerIntegrationTest.java
diff --git
a/src/test/java/de/juplo/facebook/errors/GraphApiErrorResponseErrorHandlerIntegrationTest.java
b/src/test/java/de/juplo/facebook/errors/GraphApiErrorResponseErrorHandlerIntegrationTest.java
index
254b51b
..
81bcfe6
100644
(file)
--- a/
src/test/java/de/juplo/facebook/errors/GraphApiErrorResponseErrorHandlerIntegrationTest.java
+++ b/
src/test/java/de/juplo/facebook/errors/GraphApiErrorResponseErrorHandlerIntegrationTest.java
@@
-37,7
+37,8
@@
public class GraphApiErrorResponseErrorHandlerIntegrationTest
requestFactory.setStatus(HttpStatus.CONTINUE);
try
{
requestFactory.setStatus(HttpStatus.CONTINUE);
try
{
- clientTemplate.getForObject("ANY", SOME.class);
+ String result = clientTemplate.getForObject("ANY", String.class);
+ assertEquals("{ \"message\": \"Hello World!\" }", result);
}
catch(Exception e)
{
}
catch(Exception e)
{
@@
-48,7
+49,8
@@
public class GraphApiErrorResponseErrorHandlerIntegrationTest
requestFactory.setStatus(HttpStatus.OK);
try
{
requestFactory.setStatus(HttpStatus.OK);
try
{
- clientTemplate.getForObject("ANY", SOME.class);
+ String result = clientTemplate.getForObject("ANY", String.class);
+ assertEquals("{ \"message\": \"Hello World!\" }", result);
}
catch(Exception e)
{
}
catch(Exception e)
{
@@
-59,7
+61,8
@@
public class GraphApiErrorResponseErrorHandlerIntegrationTest
requestFactory.setStatus(HttpStatus.TEMPORARY_REDIRECT);
try
{
requestFactory.setStatus(HttpStatus.TEMPORARY_REDIRECT);
try
{
- clientTemplate.getForObject("ANY", SOME.class);
+ String result = clientTemplate.getForObject("ANY", String.class);
+ assertEquals("{ \"message\": \"Hello World!\" }", result);
}
catch(Exception e)
{
}
catch(Exception e)
{
@@
-70,7
+73,7
@@
public class GraphApiErrorResponseErrorHandlerIntegrationTest
requestFactory.setStatus(HttpStatus.BAD_REQUEST);
try
{
requestFactory.setStatus(HttpStatus.BAD_REQUEST);
try
{
- clientTemplate.getForObject("ANY", S
OME
.class);
+ clientTemplate.getForObject("ANY", S
tring
.class);
fail("The parent handler should have raised an exception!");
}
catch(HttpClientErrorException e)
fail("The parent handler should have raised an exception!");
}
catch(HttpClientErrorException e)
@@
-86,7
+89,7
@@
public class GraphApiErrorResponseErrorHandlerIntegrationTest
requestFactory.setStatus(HttpStatus.INTERNAL_SERVER_ERROR);
try
{
requestFactory.setStatus(HttpStatus.INTERNAL_SERVER_ERROR);
try
{
- clientTemplate.getForObject("ANY", S
OME
.class);
+ clientTemplate.getForObject("ANY", S
tring
.class);
fail("The parent handler should have raised an exception!");
}
catch(HttpServerErrorException e)
fail("The parent handler should have raised an exception!");
}
catch(HttpServerErrorException e)
@@
-115,7
+118,7
@@
public class GraphApiErrorResponseErrorHandlerIntegrationTest
try
{
try
{
- clientTemplate.getForObject("ANY", S
OME
.class);
+ clientTemplate.getForObject("ANY", S
tring
.class);
fail("The expected exception was not thrown");
}
catch(RateLimitExceededException e)
fail("The expected exception was not thrown");
}
catch(RateLimitExceededException e)
@@
-142,7
+145,7
@@
public class GraphApiErrorResponseErrorHandlerIntegrationTest
try
{
try
{
- clientTemplate.getForObject("ANY", S
OME
.class);
+ clientTemplate.getForObject("ANY", S
tring
.class);
fail("The expected exception was not thrown");
}
catch(GraphApiException e)
fail("The expected exception was not thrown");
}
catch(GraphApiException e)
@@
-175,7
+178,7
@@
public class GraphApiErrorResponseErrorHandlerIntegrationTest
try
{
try
{
- clientTemplate.getForObject("ANY", S
OME
.class);
+ clientTemplate.getForObject("ANY", S
tring
.class);
fail("The expected exception was not thrown");
}
catch(HttpClientErrorException e)
fail("The expected exception was not thrown");
}
catch(HttpClientErrorException e)
@@
-202,9
+205,4
@@
public class GraphApiErrorResponseErrorHandlerIntegrationTest
new GraphApiErrorResponseErrorHandler(clientTemplate.getErrorHandler())
);
}
new GraphApiErrorResponseErrorHandler(clientTemplate.getErrorHandler())
);
}
-
-
- static class SOME
- {
- }
}
}