#2810 - Adding a Java API for JavaSerializer.currentSystem + added tests
This commit is contained in:
parent
68f72459a3
commit
146834832d
2 changed files with 29 additions and 2 deletions
|
|
@ -1,8 +1,11 @@
|
|||
package akka.japi;
|
||||
|
||||
import akka.actor.ExtendedActorSystem;
|
||||
import akka.event.LoggingAdapter;
|
||||
import akka.event.NoLogging;
|
||||
import akka.serialization.JavaSerializer;
|
||||
import org.junit.Test;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
|
|
@ -54,4 +57,13 @@ public class JavaAPITestBase {
|
|||
LoggingAdapter a = NoLogging.getInstance();
|
||||
assertNotNull(a);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mustBeAbleToUseCurrentSystem() {
|
||||
assertNull(JavaSerializer.currentSystem().withValue(null, new Callable<ExtendedActorSystem>() {
|
||||
public ExtendedActorSystem call() {
|
||||
return JavaSerializer.currentSystem().value();
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue