package tests;

import junit.framework.TestCase;
import api.SimpleAPI;

public class TestSimpleAPI extends TestCase {
	/**
	 * Test method for {@link api.SimpleAPI#add(int, int)}.
	 */
	public void testAdd() {
		int a = SimpleAPI.add(2, 3);
		assertTrue("Add API not working. Expected 5 but received: " + a, a == 5);
	}

	/**
	 * Test method for {@link api.SimpleAPI#subtract(int, int)}.
	 */
	public void testSubtract() {
		int a = SimpleAPI.subtract(2, 3);
		assertTrue("Subtract API not working. Expected -1 but received: " + a, a == -1);

		a = SimpleAPI.subtract(3, -4);
		assertTrue("Subtract API not working. Expected 7 but received: " + a, a == 7);

		a = SimpleAPI.subtract(5, 4);
		assertTrue("Subtract API not working. Expected 1 but received: " + a, a == 1);
	}

	/**
	 * Test method for {@link api.SimpleAPI#divide(int, int)}.
	 */
	public void testDivide() {
		int a = SimpleAPI.divide(44, 11);
		assertTrue("Subtract API not working. Expected 4 but received: " + a, a == 4);
	}

	/**
	 * Test method for {@link api.SimpleAPI#multiply(int, int)}.
	 */
	public void testMultiply() {
		int a = SimpleAPI.multiply(2, 3);
		assertTrue("Multiply API not working. Expected 6 but received: " + a, a == 6);
	}
}

@@ -1208,11 +1208,175 @@
 = 6);%0A%09%7D
+%0A%0A%09public void testFailure1() %7B%0A%09%09assertTrue(%22A dummy test failure: 1%22, false);%0A%09%7D%0A%0A%09public void testFailure2() %7B%0A%09%09assertTrue(%22A dummy test failure: 2%22, false);%0A%09%7D
 %0A%7D%0A

Add dummy failures