MCPcopy Index your code
hub / github.com/BoltsFramework/Bolts-Java / testBackgroundError

Method testBackgroundError

BoltsTest/src/bolts/TaskTest.java:180–196  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

178 }
179
180 public void testBackgroundError() {
181 runTaskTest(new Callable<Task<?>>() {
182 public Task<?> call() throws Exception {
183 return Task.callInBackground(new Callable<Integer>() {
184 public Integer call() throws Exception {
185 throw new IllegalStateException();
186 }
187 }).continueWith(new Continuation<Integer, Void>() {
188 public Void then(Task<Integer> task) {
189 assertTrue(task.isFaulted());
190 assertTrue(task.getError() instanceof IllegalStateException);
191 return null;
192 }
193 });
194 }
195 });
196 }
197
198 public void testWhenAllSuccess() {
199 runTaskTest(new Callable<Task<?>>() {

Callers

nothing calls this directly

Calls 1

runTaskTestMethod · 0.95

Tested by

no test coverage detected