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

Method testBackgroundCall

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

Source from the content-addressed store, hash-verified

119 }
120
121 public void testBackgroundCall() {
122 runTaskTest(new Callable<Task<?>>() {
123 public Task<?> call() throws Exception {
124 return Task.callInBackground(new Callable<Integer>() {
125 public Integer call() throws Exception {
126 Thread.sleep(100);
127 return 5;
128 }
129 }).continueWith(new Continuation<Integer, Void>() {
130 public Void then(Task<Integer> task) {
131 assertEquals(5, task.getResult().intValue());
132 return null;
133 }
134 });
135 }
136 });
137 }
138
139 public void testBackgroundCallWaiting() throws Exception {
140 Task<Integer> task = Task.callInBackground(new Callable<Integer>() {

Callers

nothing calls this directly

Calls 1

runTaskTestMethod · 0.95

Tested by

no test coverage detected