summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/test/at/ac/tuwien/sepm/assignment/groupphase/operation/OperationServiceComponentTest.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/test/at/ac/tuwien/sepm/assignment/groupphase/operation/OperationServiceComponentTest.java b/src/test/at/ac/tuwien/sepm/assignment/groupphase/operation/OperationServiceComponentTest.java
index fc3ea54..aeee11f 100644
--- a/src/test/at/ac/tuwien/sepm/assignment/groupphase/operation/OperationServiceComponentTest.java
+++ b/src/test/at/ac/tuwien/sepm/assignment/groupphase/operation/OperationServiceComponentTest.java
@@ -17,7 +17,6 @@ import at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.dto.Vehicle.Veh
import at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.service.OperationService;
import at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.service.OperationServiceImpl;
import at.ac.tuwien.sepm.assignment.groupphase.exception.InvalidOperationException;
-import at.ac.tuwien.sepm.assignment.groupphase.exception.PersistenceException;
import at.ac.tuwien.sepm.assignment.groupphase.exception.ServiceException;
import at.ac.tuwien.sepm.assignment.groupphase.util.JDBCConnectionManager;
import java.time.Instant;
@@ -27,12 +26,11 @@ import org.junit.Test;
public class OperationServiceComponentTest {
- private final OperationDAO operationDAO = new DBOperationDAO(new JDBCConnectionManager());
+ private final OperationDAO operationDAO = new DBOperationDAO(new JDBCConnectionManager("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1"));
private final OperationService operationService = new OperationServiceImpl(operationDAO);
@Test
public void addOperationTest() {
- //TODO: MOCK H2
Vehicle vehicle =
Vehicle.builder()
.status(Vehicle.Status.FREI_FUNK)
@@ -53,6 +51,7 @@ public class OperationServiceComponentTest {
.vehicles(List.of(vehicle))
.build();
try {
+ //TODO: OPERATION DOES NOT WORK
Assert.assertThat(operationService.add(operation), is(1L));
} catch (InvalidOperationException | ServiceException e) {
fail();