-
-
Save olafleur/09e09ad6662fb099983bfd24be0dd0fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static com.olivierlafleur.testtest.MyTestFramework.checkEqual; | |
import static com.olivierlafleur.testtest.MyTestFramework.checkTrue; | |
public class TestsClass { | |
//This test should fail because it raises an exception | |
public void divisionByZeroTest() { | |
int var1 = 1; | |
int var2 = 2; | |
int res = 2/0; | |
checkTrue(var2 > var1); | |
} | |
//This test should pass | |
public void anotherTest() { | |
int var1 = 1; | |
int var2 = 2; | |
checkTrue(var2 > var1); | |
} | |
//This test should fail | |
public void anotherTest2() { | |
int var1 = 1; | |
int var2 = 2; | |
checkTrue(var1 > var2); | |
} | |
//This test should pass | |
public void equalityTest() { | |
checkEqual(2, 2); | |
} | |
//This test should fail | |
public void inequalityTest() { | |
checkEqual(1, 2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment