add extractActorSystem directive (#21097)

This commit is contained in:
Hawstein 2016-08-16 20:59:05 +08:00 committed by Konrad Malawski
parent 07c6332a22
commit 3e2bdb55a3
8 changed files with 96 additions and 2 deletions

View file

@ -877,4 +877,17 @@ public class BasicDirectivesExamplesTest extends JUnitRouteTest {
//#toStrictEntity
}
@Test
public void testExtractActorSystem() {
//#extractActorSystem
final Route route = extractActorSystem(actorSystem ->
complete("Actor System extracted, hash=" + actorSystem.hashCode())
);
// tests:
testRoute(route).run(HttpRequest.GET("/"))
.assertEntity("Actor System extracted, hash=" + system().hashCode());
//#extractActorSystem
}
}