1
- package io .eigr .spawn ;
1
+ package io .eigr .spawn . test ;
2
2
3
+ import domain .actors .Reply ;
4
+ import domain .actors .Request ;
3
5
import io .eigr .spawn .api .ActorIdentity ;
4
6
import io .eigr .spawn .api .ActorRef ;
5
7
import io .eigr .spawn .api .exceptions .ActorCreationException ;
6
8
import io .eigr .spawn .api .exceptions .ActorInvocationException ;
7
- import io .eigr .spawn .java .test .domain .Actor ;
8
9
import io .eigr .spawn .test .actors .JoeActor ;
9
10
import io .eigr .spawn .test .actors .StatelessNamedActor ;
10
11
import io .eigr .spawn .test .actors .UnNamedActor ;
@@ -25,15 +26,15 @@ void testNamedInvocation() throws ActorCreationException, ActorInvocationExcepti
25
26
Assertions .assertEquals (type , JoeActor .class );
26
27
Assertions .assertNotNull (joeActor );
27
28
28
- Actor . Request msg = Actor . Request .newBuilder ()
29
+ Request msg = Request .newBuilder ()
29
30
.setLanguage ("Erlang" )
30
31
.build ();
31
32
32
- Optional <Actor . Reply > maybeReply =
33
- joeActor .invoke ("SetLanguage" , msg , Actor . Reply .class );
33
+ Optional <Reply > maybeReply =
34
+ joeActor .invoke ("SetLanguage" , msg , Reply .class );
34
35
35
36
if (maybeReply .isPresent ()) {
36
- Actor . Reply reply = maybeReply .get ();
37
+ Reply reply = maybeReply .get ();
37
38
Assertions .assertNotNull (reply );
38
39
Assertions .assertEquals ("Hi Erlang. Hello From Java" , reply .getResponse ());
39
40
}
@@ -49,15 +50,15 @@ void testUnNamedInvocation() throws ActorCreationException, ActorInvocationExcep
49
50
Assertions .assertEquals (type , UnNamedActor .class );
50
51
Assertions .assertNotNull (unNamedJoeActor );
51
52
52
- Actor . Request msg = Actor . Request .newBuilder ()
53
+ Request msg = Request .newBuilder ()
53
54
.setLanguage ("Erlang" )
54
55
.build ();
55
56
56
- Optional <Actor . Reply > maybeReply =
57
- unNamedJoeActor .invoke ("SetLanguage" , msg , Actor . Reply .class );
57
+ Optional <Reply > maybeReply =
58
+ unNamedJoeActor .invoke ("SetLanguage" , msg , Reply .class );
58
59
59
60
if (maybeReply .isPresent ()) {
60
- Actor . Reply reply = maybeReply .get ();
61
+ Reply reply = maybeReply .get ();
61
62
Assertions .assertNotNull (reply );
62
63
Assertions .assertEquals ("Hi Erlang. Hello From Java" , reply .getResponse ());
63
64
}
@@ -73,15 +74,15 @@ void testStatelessInvocation() throws ActorCreationException, ActorInvocationExc
73
74
Assertions .assertEquals (type , StatelessNamedActor .class );
74
75
Assertions .assertNotNull (statelessNamedActor );
75
76
76
- Actor . Request msg = Actor . Request .newBuilder ()
77
+ Request msg = Request .newBuilder ()
77
78
.setLanguage ("Elixir" )
78
79
.build ();
79
80
80
- Optional <Actor . Reply > maybeReply =
81
- statelessNamedActor .invoke ("SetLanguage" , msg , Actor . Reply .class );
81
+ Optional <Reply > maybeReply =
82
+ statelessNamedActor .invoke ("SetLanguage" , msg , Reply .class );
82
83
83
84
if (maybeReply .isPresent ()) {
84
- Actor . Reply reply = maybeReply .get ();
85
+ Reply reply = maybeReply .get ();
85
86
Assertions .assertNotNull (reply );
86
87
Assertions .assertEquals ("Hi Elixir. Hello From Java" , reply .getResponse ());
87
88
}
0 commit comments