mirror of
https://github.com/kmitresse/Cards-Rush.git
synced 2026-07-09 13:27:45 +00:00
test(DevWeb): Add tests for AbstractDAOFactory
This commit is contained in:
@@ -1,12 +1,22 @@
|
|||||||
package uppa.project.dao;
|
package uppa.project.dao;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.Test;
|
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.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
class AbstractDAOFactoryTest {
|
class AbstractDAOFactoryTest {
|
||||||
|
|
||||||
|
@BeforeAll
|
||||||
|
static void setUp() {
|
||||||
|
EntityManagerProvider.setPersitenceUnitName("test");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void getDAOFactory() {
|
void getDAOFactory() {
|
||||||
// TODO Implement this method
|
assertEquals(Game_JPA_DAO_Factory.class, AbstractDAOFactory.getDAOFactory(PersistenceKind.JPA).getClass());
|
||||||
fail();
|
|
||||||
|
assertThrows(NullPointerException.class, () -> AbstractDAOFactory.getDAOFactory(null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user