示例#1
0
  @Test
  public void testStatusCorrect() {
    validTrial.setStatus(TrialStatus.IN_PREPARATION);
    assertEquals(TrialStatus.IN_PREPARATION, validTrial.getStatus());
    assertValid(validTrial);

    validTrial.setStatus(TrialStatus.ACTIVE);
    assertEquals(TrialStatus.ACTIVE, validTrial.getStatus());
    assertValid(validTrial);

    validTrial.setStatus(TrialStatus.PAUSED);
    assertEquals(TrialStatus.PAUSED, validTrial.getStatus());
    assertValid(validTrial);

    validTrial.setStatus(TrialStatus.FINISHED);
    assertEquals(TrialStatus.FINISHED, validTrial.getStatus());
  }
示例#2
0
 @Test
 public void testStatusNotNull() {
   validTrial.setStatus(null);
   assertNull(validTrial.getStatus());
   assertInvalid(validTrial);
 }