Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import junit.framework.TestCase;
- public class MyFirstTest extends TestCase {
- public void testOneAndOneIsTwo() {
- assertEquals(2, add(1, 1));
- }
- public void testTwoAndTwoIsFour() {
- assertEquals(4, add(2, 2));
- }
- public void testTwoAndThreeIsFive() {
- assertEquals(5, add(2, 3));
- }
- private int add(int left, int right) {
- return left + right;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement