Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanenicolas committed Jul 17, 2013
1 parent b7deccd commit 7aafa1c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
spiceManager.start(getInstrumentation().getTargetContext());
spiceManager.shouldStop();
spiceManager.start(getInstrumentation().getTargetContext());
SpiceRequestStub<String> spiceRequestStub=new SpiceRequestFailingStub<String>(TEST_CLASS,WAIT_BEFORE_EXECUTING_REQUEST_LARGE);
RequestListenerStub<String> requestListenerStub=new RequestListenerStub<String>();
spiceManager.execute(spiceRequestStub,TEST_CACHE_KEY,TEST_DURATION,requestListenerStub);
spiceRequestStub.awaitForLoadDataFromNetworkIsCalled(REQUEST_COMPLETION_TIME_OUT);
assertNull(requestListenerStub.isSuccessful());
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
mockWebServer.play();
BitmapRequest binaryRequest=new BitmapRequest(mockWebServer.getUrl("/").toString(),null,cacheFile);
try {
Bitmap bitmapReturned=binaryRequest.loadDataFromNetwork();
binaryRequest.loadDataFromNetwork();
fail();
}
catch ( FileNotFoundException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
mockWebServer.play();
SimpleTextRequest loremIpsumTextRequest=new SimpleTextRequest(mockWebServer.getUrl("/").toString());
try {
String stringReturned=loremIpsumTextRequest.loadDataFromNetwork();
loremIpsumTextRequest.loadDataFromNetwork();
fail();
}
catch ( FileNotFoundException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
mockWebServer.play();
SmallBinaryRequest binaryRequest=new SmallBinaryRequest(mockWebServer.getUrl("/").toString());
try {
InputStream binaryReturned=binaryRequest.loadDataFromNetwork();
binaryRequest.loadDataFromNetwork();
fail();
}
catch ( FileNotFoundException e) {
Expand Down

0 comments on commit 7aafa1c

Please sign in to comment.