travaux intégration UI
This commit is contained in:
parent
15c360f9e9
commit
4f073a7361
@ -7,6 +7,7 @@ import java.time.LocalDateTime;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import dev.mduchene.util.ResourceFileLister;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.jooq.Meta;
|
import org.jooq.Meta;
|
||||||
import org.jooq.impl.DSL;
|
import org.jooq.impl.DSL;
|
||||||
|
|||||||
@ -22,7 +22,9 @@ public class Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Server start() {
|
public Server start() {
|
||||||
app = Javalin.create(cnf -> {});
|
app = Javalin.create(cnf -> {
|
||||||
|
cnf.useVirtualThreads = true;
|
||||||
|
});
|
||||||
app.before(
|
app.before(
|
||||||
ctx -> {
|
ctx -> {
|
||||||
Connection connection = db.getConnection();
|
Connection connection = db.getConnection();
|
||||||
|
|||||||
@ -1,12 +1,9 @@
|
|||||||
package dev.mduchene;
|
package dev.mduchene.util;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.UncheckedIOException;
|
|
||||||
import java.net.http.HttpResponse;
|
import java.net.http.HttpResponse;
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
public class JsonBodyHandler implements HttpResponse.BodyHandler<JsonNode> {
|
public class JsonBodyHandler implements HttpResponse.BodyHandler<JsonNode> {
|
||||||
private static JsonBodyHandler instance;
|
private static JsonBodyHandler instance;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package dev.mduchene;
|
package dev.mduchene.util;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -9,6 +9,7 @@ public class BoltsIntegrationTest
|
|||||||
public static final int PORT = 4001;
|
public static final int PORT = 4001;
|
||||||
public static final String BASE_URL = "http://localhost:" + PORT;
|
public static final String BASE_URL = "http://localhost:" + PORT;
|
||||||
|
|
||||||
|
private Db db;
|
||||||
private Server server;
|
private Server server;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
12
src/test/java/dev/mduchene/LoginTest.java
Normal file
12
src/test/java/dev/mduchene/LoginTest.java
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package dev.mduchene;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
|
|
||||||
|
@ExtendWith(BoltsIntegrationTest.class)
|
||||||
|
public class LoginTest {
|
||||||
|
@Test
|
||||||
|
public void testLogin() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,6 +1,8 @@
|
|||||||
package dev.mduchene;
|
package dev.mduchene;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import dev.mduchene.util.JsonBodyHandler;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.http.HttpClient;
|
import java.net.http.HttpClient;
|
||||||
import java.net.http.HttpRequest;
|
import java.net.http.HttpRequest;
|
||||||
|
|||||||
5
src/test/java/dev/mduchene/factory/FakeUserFactory.java
Normal file
5
src/test/java/dev/mduchene/factory/FakeUserFactory.java
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package dev.mduchene.factory;
|
||||||
|
|
||||||
|
public class FakeUserFactory {
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user