This commit is contained in:
Imbus 2024-04-20 21:36:30 +02:00
parent 5f374c92f4
commit e526b41b3f
2 changed files with 29 additions and 14 deletions

View file

@ -1,6 +1,6 @@
package krusty;
import static org.junit.Assert.*;
import static org.junit.jupiter.api.Assertions.fail;
import java.io.IOException;
import java.nio.file.Files;
@ -10,18 +10,16 @@ import java.util.Calendar;
import java.util.Date;
import org.json.JSONException;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.skyscreamer.jsonassert.JSONAssert;
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class KrustyTests {
public static final String BASE_URL = "http://localhost:" + ServerMain.PORT + ServerMain.API_ENTRYPOINT + "/";
@ -166,7 +164,7 @@ public class KrustyTests {
*/
private static ServerMain server;
@BeforeClass
@BeforeAll
public static void startServer() throws InterruptedException {
try {
// Check if rest server is running
@ -186,7 +184,7 @@ public class KrustyTests {
}
}
@AfterClass
@AfterAll
public static void stopServer() {
if (server != null) {
server.stopServer();