add extractActorSystem directive (#21097)
This commit is contained in:
parent
07c6332a22
commit
3e2bdb55a3
8 changed files with 96 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue