test(DevWeb): Add tests for AbstractDAOFactory

This commit is contained in:
Lucàs
2024-03-27 23:04:27 +01:00
parent 04a541341a
commit d101f4e7da
@@ -1,12 +1,22 @@
package uppa.project.dao;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import uppa.project.dao.jpa.Game_JPA_DAO_Factory;
import uppa.project.provider.EntityManagerProvider;
import static org.junit.jupiter.api.Assertions.*;
class AbstractDAOFactoryTest {
@BeforeAll
static void setUp() {
EntityManagerProvider.setPersitenceUnitName("test");
}
@Test
void getDAOFactory() {
// TODO Implement this method
fail();
assertEquals(Game_JPA_DAO_Factory.class, AbstractDAOFactory.getDAOFactory(PersistenceKind.JPA).getClass());
assertThrows(NullPointerException.class, () -> AbstractDAOFactory.getDAOFactory(null));
}
}