コード例 #1
0
 @Test
 public void testGetAllStatuses() throws Exception {
   List<TaskStatus> statuses = taskService.getAllStatuses();
   for (TaskStatus taskStatus : statuses) {
     assertTrue(taskStatus.getId() > 0);
     assertNotNull(taskStatus.getName());
     assertNotEquals("", taskStatus.getName());
   }
 }
コード例 #2
0
 @Test
 public void testGetTaskStatusByName() throws Exception {
   Optional<TaskStatus> optStatus = taskService.getTaskStatusByName("New");
   assertTrue(optStatus.isPresent());
   TaskStatus stat = optStatus.get();
   assertNotNull(stat);
   assertEquals("New", stat.getName());
   assertTrue(stat.getId() > 0);
 }