8
8
import io .eigr .spawn .test .actors .JoeActor ;
9
9
import io .eigr .spawn .test .actors .StatelessNamedActor ;
10
10
import io .eigr .spawn .test .actors .UnNamedActor ;
11
- import org .junit .Test ;
11
+ import org .junit .jupiter .api .Assertions ;
12
+ import org .junit .jupiter .api .Test ;
12
13
13
14
import java .util .Optional ;
14
15
15
16
import static org .junit .Assert .assertEquals ;
16
17
import static org .junit .Assert .assertNotNull ;
17
18
18
- public class SpawnTest extends AbstractContainerBaseTest {
19
+ class SpawnTest extends AbstractContainerBaseTest {
19
20
20
21
@ Test
21
- public void testNamedInvocation () throws ActorCreationException , ActorInvocationException {
22
+ void testNamedInvocation () throws ActorCreationException , ActorInvocationException {
22
23
ActorRef joeActor = spawnSystem .createActorRef (
23
24
ActorIdentity .of (spawnSystemName , "JoeActor" ));
24
25
25
26
Class type = joeActor .getType ();
26
27
27
- assertEquals (type , JoeActor .class );
28
- assertNotNull (joeActor );
28
+ Assertions . assertEquals (type , JoeActor .class );
29
+ Assertions . assertNotNull (joeActor );
29
30
30
31
Actor .Request msg = Actor .Request .newBuilder ()
31
32
.setLanguage ("Erlang" )
@@ -36,20 +37,20 @@ public void testNamedInvocation() throws ActorCreationException, ActorInvocation
36
37
37
38
if (maybeReply .isPresent ()) {
38
39
Actor .Reply reply = maybeReply .get ();
39
- assertNotNull (reply );
40
- assertEquals ("Hi Erlang. Hello From Java" , reply .getResponse ());
40
+ Assertions . assertNotNull (reply );
41
+ Assertions . assertEquals ("Hi Erlang. Hello From Java" , reply .getResponse ());
41
42
}
42
43
}
43
44
44
45
@ Test
45
- public void testUnNamedInvocation () throws ActorCreationException , ActorInvocationException {
46
+ void testUnNamedInvocation () throws ActorCreationException , ActorInvocationException {
46
47
ActorRef unNamedJoeActor = spawnSystem .createActorRef (
47
48
ActorIdentity .of (spawnSystemName , "UnNamedJoeActor" , "UnNamedActor" ));
48
49
49
50
Class type = unNamedJoeActor .getType ();
50
51
51
- assertEquals (type , UnNamedActor .class );
52
- assertNotNull (unNamedJoeActor );
52
+ Assertions . assertEquals (type , UnNamedActor .class );
53
+ Assertions . assertNotNull (unNamedJoeActor );
53
54
54
55
Actor .Request msg = Actor .Request .newBuilder ()
55
56
.setLanguage ("Erlang" )
@@ -60,20 +61,20 @@ public void testUnNamedInvocation() throws ActorCreationException, ActorInvocati
60
61
61
62
if (maybeReply .isPresent ()) {
62
63
Actor .Reply reply = maybeReply .get ();
63
- assertNotNull (reply );
64
- assertEquals ("Hi Erlang. Hello From Java" , reply .getResponse ());
64
+ Assertions . assertNotNull (reply );
65
+ Assertions . assertEquals ("Hi Erlang. Hello From Java" , reply .getResponse ());
65
66
}
66
67
}
67
68
68
69
@ Test
69
- public void testStatelessInvocation () throws ActorCreationException , ActorInvocationException {
70
+ void testStatelessInvocation () throws ActorCreationException , ActorInvocationException {
70
71
ActorRef statelessNamedActor = spawnSystem .createActorRef (
71
72
ActorIdentity .of (spawnSystemName , "StatelessNamedActor" ));
72
73
73
74
Class type = statelessNamedActor .getType ();
74
75
75
- assertEquals (type , StatelessNamedActor .class );
76
- assertNotNull (statelessNamedActor );
76
+ Assertions . assertEquals (type , StatelessNamedActor .class );
77
+ Assertions . assertNotNull (statelessNamedActor );
77
78
78
79
Actor .Request msg = Actor .Request .newBuilder ()
79
80
.setLanguage ("Elixir" )
@@ -84,8 +85,8 @@ public void testStatelessInvocation() throws ActorCreationException, ActorInvoca
84
85
85
86
if (maybeReply .isPresent ()) {
86
87
Actor .Reply reply = maybeReply .get ();
87
- assertNotNull (reply );
88
- assertEquals ("Hi Elixir. Hello From Java" , reply .getResponse ());
88
+ Assertions . assertNotNull (reply );
89
+ Assertions . assertEquals ("Hi Elixir. Hello From Java" , reply .getResponse ());
89
90
}
90
91
}
91
92
}
0 commit comments