Added test for failing TypedActor with method 'String hello(String s)'
This commit is contained in:
parent
139a064110
commit
ea5648e8e3
3 changed files with 10 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ import akka.dispatch.Future;
|
|||
import akka.japi.Option;
|
||||
|
||||
public interface SimpleJavaPojo {
|
||||
String hello(String name);
|
||||
public Object getSender();
|
||||
public Object getSenderFuture();
|
||||
public Future<Integer> square(int value);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@ public class SimpleJavaPojoImpl extends TypedActor implements SimpleJavaPojo {
|
|||
|
||||
private String name;
|
||||
|
||||
public String hello(String name) {
|
||||
return "Hello " + name;
|
||||
}
|
||||
|
||||
public Future<Integer> square(int value) {
|
||||
return future(value * value);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,6 +73,11 @@ class TypedActorSpec extends
|
|||
|
||||
describe("TypedActor") {
|
||||
|
||||
it("should return POJO method return value when invoked") {
|
||||
val result = simplePojo.hello("POJO")
|
||||
result should equal ("Hello POJO")
|
||||
}
|
||||
|
||||
it("should resolve Future return from method defined to return a Future") {
|
||||
val future = simplePojo.square(10)
|
||||
future.await
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue