secret
anonymous / junitfail
Created

Terrible and meaningless unit tests

  • Download Gist
junitfail
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
@Test
public void testCheckIfTrainingCompletedReturnsBooleanTrue() throws Exception {
 
boolean trainingStatus;
boolean trainingSuccessfulyComplete = true;
 
trainingStatus = trainingSuccessfulyComplete;
 
assertEquals(trainingStatus, trainingSuccessfulyComplete);
}
 
@Test
public void testCheckIfTrainingCompletedReturnsBooleanFalse() throws Exception {
 
boolean trainingStatus;
boolean trainingNotCompleted = false;
 
trainingStatus = trainingNotCompleted;
assertEquals(trainingStatus, trainingNotCompleted);
}
 
@Test
public void testTrainingHeaderIsNull() throws Exception {
 
TrainingEntry trainingEntry = null;
assertNull(trainingEntry);
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.