moved tests from akka-actor to new module akka-actor-tests to fix circular dependencies between testkit and akka-actor
This commit is contained in:
parent
71a32c719a
commit
0abf51d878
41 changed files with 14 additions and 11 deletions
|
|
@ -1,30 +0,0 @@
|
|||
package akka.dispatch;
|
||||
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
import java.util.concurrent.Callable;
|
||||
import akka.japi.Function;
|
||||
import akka.japi.Procedure;
|
||||
import scala.Some;
|
||||
import scala.Right;
|
||||
import static akka.dispatch.Futures.future;
|
||||
|
||||
@SuppressWarnings("unchecked") public class JavaFutureTests {
|
||||
|
||||
@Test public void mustBeAbleToMapAFuture() {
|
||||
Future f1 = future(new Callable<String>() {
|
||||
public String call() {
|
||||
return "Hello";
|
||||
}
|
||||
});
|
||||
|
||||
Future f2 = f1.map(new Function<String, String>() {
|
||||
public String apply(String s) {
|
||||
return s + " World";
|
||||
}
|
||||
});
|
||||
|
||||
assertEquals(new Some(new Right("Hello World")), f2.await().value());
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue