@Test public void testGetTaskStatusByID() throws Exception { Optional<TaskStatus> optStatus = taskService.getTaskStatusByID(1); assertTrue(optStatus.isPresent()); TaskStatus stat = optStatus.get(); assertNotNull(stat); assertEquals(1, stat.getId()); assertNotNull(stat.getName()); }
@BeforeClass public static void setUpClass() throws Exception { ABEntityTest.initDB(); StorageSingleton.init(new StorageServiceImpl()); taskService = new TaskServiceImpl(); project = new ProjectServiceImpl().getProjectByID(1).get(); user = new UserServiceImpl().findUserByID(1).get(); assigneeUser = new UserServiceImpl().findUserByID(2).get(); type = taskService.getTaskTypeByID(1).get(); priority = taskService.getTaskPriorityByID(1).get(); status = taskService.getTaskStatusByID(1).get(); }