Skip to content

Instantly share code, notes, and snippets.

/junitfail Secret

Created December 21, 2012 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/8d2b90022ffb23f30749 to your computer and use it in GitHub Desktop.
Save anonymous/8d2b90022ffb23f30749 to your computer and use it in GitHub Desktop.
Terrible and meaningless unit tests
@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);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment