mirror of
https://github.com/kmitresse/Cards-Rush.git
synced 2026-05-13 17:11:49 +00:00
test(DevWeb): Add tests for AbstractDAOFactory
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user