diff --git a/backend/configuration.yml b/backend/configuration.yml index a148c8b..5bed63d 100644 --- a/backend/configuration.yml +++ b/backend/configuration.yml @@ -1,9 +1,9 @@ database: # the name of your JDBC driver - driverClass: org.sqlite.JDBC + driverClass: org.h2.Driver # the JDBC URL - url: jdbc:sqlite:sampledatabase.db + url: jdbc:h2:./sampledatabase.db # any properties specific to your JDBC driver: properties: diff --git a/backend/pom.xml b/backend/pom.xml index 2b07314..28d35ae 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -62,11 +62,6 @@ h2 1.4.197 - - org.xerial - sqlite-jdbc - 3.23.1 - diff --git a/backend/src/main/java/uk/co/neviyn/Observations/ObservationsApplication.java b/backend/src/main/java/uk/co/neviyn/Observations/ObservationsApplication.java index 3ebdeea..74fc2b3 100644 --- a/backend/src/main/java/uk/co/neviyn/Observations/ObservationsApplication.java +++ b/backend/src/main/java/uk/co/neviyn/Observations/ObservationsApplication.java @@ -48,9 +48,6 @@ public class ObservationsApplication extends Application getSiteTutors(long id){ + public Set getSiteTutors(@PathParam("id") long id){ return dao.get(id).getTutors(); } } diff --git a/backend/src/test/java/uk/co/neviyn/Observations/dao/ObservationDaoTest.java b/backend/src/test/java/uk/co/neviyn/Observations/dao/ObservationDaoTest.java index cc8e9a4..ba6370a 100644 --- a/backend/src/test/java/uk/co/neviyn/Observations/dao/ObservationDaoTest.java +++ b/backend/src/test/java/uk/co/neviyn/Observations/dao/ObservationDaoTest.java @@ -30,14 +30,14 @@ public class ObservationDaoTest { ); @Before - public void setUp() throws Exception { + public void setUp() { dao = new ObservationDao(testRule.getSessionFactory()); siteDao = new SiteDao(testRule.getSessionFactory()); testRule.inTransaction(() -> siteDao.persist(site)); } @Test - public void persistAndGet(){ + public void persistAndGet() { Observation insert = testRule.inTransaction(() -> dao.persist(observation)); assertNotNull(insert); assertTrue(insert.getId() > 0); @@ -47,7 +47,7 @@ public class ObservationDaoTest { public void listAll() { int numberOfObservations = 5; testRule.inTransaction(() -> { - for(int i = 0; i < numberOfObservations; i++){ + for (int i = 0; i < numberOfObservations; i++) { // Make actual copies, otherwise they will merely overwrite. dao.persist(SerializationUtils.clone(observation)); }