File tree 3 files changed +13
-14
lines changed
src/test/java/ma/luan/yiyan
3 files changed +13
-14
lines changed Original file line number Diff line number Diff line change 11
11
import io .vertx .ext .web .client .WebClient ;
12
12
import io .vertx .ext .web .client .WebClientOptions ;
13
13
import ma .luan .yiyan .MainVerticle ;
14
- import org .junit .Before ;
14
+ import org .junit .BeforeClass ;
15
15
import org .junit .Test ;
16
16
import org .junit .runner .RunWith ;
17
17
24
24
25
25
@ RunWith (VertxUnitRunner .class )
26
26
public class ApiVerticleTest {
27
- private WebClient webClient ;
27
+ private static WebClient webClient ;
28
28
29
- @ Before
30
- public void beforeClass (TestContext context ) {
29
+ @ BeforeClass
30
+ public static void beforeClass (TestContext context ) {
31
31
Async async = context .async ();
32
32
Vertx vertx = Vertx .vertx ();
33
33
JsonObject config = new JsonObject (vertx .
Original file line number Diff line number Diff line change 8
8
import io .vertx .ext .unit .TestContext ;
9
9
import io .vertx .ext .unit .junit .VertxUnitRunner ;
10
10
import ma .luan .yiyan .constants .Key ;
11
- import org .junit .Before ;
11
+ import org .junit .BeforeClass ;
12
12
import org .junit .Test ;
13
13
import org .junit .runner .RunWith ;
14
14
19
19
20
20
@ RunWith (VertxUnitRunner .class )
21
21
public class DataServiceTest {
22
- private Vertx vertx ;
22
+ private static Vertx vertx ;
23
23
24
- @ Before
25
- public void beforeClass (TestContext context ) {
24
+ @ BeforeClass
25
+ public static void beforeClass (TestContext context ) {
26
26
Async async = context .async ();
27
27
vertx = Vertx .vertx ();
28
28
JsonObject config = new JsonObject (vertx .
Original file line number Diff line number Diff line change 7
7
import io .vertx .ext .unit .TestContext ;
8
8
import io .vertx .ext .unit .junit .VertxUnitRunner ;
9
9
import ma .luan .yiyan .constants .Key ;
10
- import org .junit .Before ;
10
+ import org .junit .BeforeClass ;
11
11
import org .junit .Test ;
12
12
import org .junit .runner .RunWith ;
13
13
17
17
18
18
@ RunWith (VertxUnitRunner .class )
19
19
public class LogServiceTest {
20
- private Vertx vertx ;
21
- private JsonObject config ;
20
+ private static Vertx vertx ;
22
21
23
- @ Before
24
- public void beforeClass (TestContext context ) {
22
+ @ BeforeClass
23
+ public static void beforeClass (TestContext context ) {
25
24
Async async = context .async ();
26
25
vertx = Vertx .vertx ();
27
- config = new JsonObject (vertx .
26
+ JsonObject config = new JsonObject (vertx .
28
27
fileSystem ().readFileBlocking ("conf.json" ));
29
28
vertx .deployVerticle (new LogService (), new DeploymentOptions ().setConfig (config ), c -> {
30
29
async .complete ();
You can’t perform that action at this time.
0 commit comments