Search in sources :

Example 1 with FilterRepository

use of com.artezio.arttime.services.repositories.FilterRepository in project ART-TIME by Artezio.

the class FilterRepositoryTest method setUp.

@Before
public void setUp() throws Exception {
    filterRepository = new FilterRepository();
    projectRepository = EasyMock.createMock(ProjectRepository.class);
    setField(filterRepository, "projectRepository", projectRepository);
    Map<String, String> properties = new HashMap<String, String>();
    properties.put("javax.persistence.validation.mode", "none");
    entityManagerFactory = Persistence.createEntityManagerFactory("test", properties);
    entityManager = entityManagerFactory.createEntityManager();
    setField(filterRepository, "entityManager", entityManager);
    entityManager.getTransaction().begin();
}
Also used : ProjectRepository(com.artezio.arttime.services.repositories.ProjectRepository) FilterRepository(com.artezio.arttime.services.repositories.FilterRepository) HashMap(java.util.HashMap) Before(org.junit.Before)

Aggregations

FilterRepository (com.artezio.arttime.services.repositories.FilterRepository)1 ProjectRepository (com.artezio.arttime.services.repositories.ProjectRepository)1 HashMap (java.util.HashMap)1 Before (org.junit.Before)1