import org.junit.*;
import static org.junit.Assert.*;
/**
* The class CalculatorTest
contains tests for the class {@link Calculator}
.
*
* @generatedBy CodePro at 09.08.12 11:54
* @author Peter Mentz
* @version $Revision: 1.0 $
*/
public class CalculatorTest {
/**
* Run the int add(int,int) method test.
*
* @throws Exception
*
* @generatedBy CodePro at 09.08.12 13:12
*/
@Test
public void testAdd_1()
throws Exception {
Calculator fixture = new Calculator();
int a = 1;
int b = 1;
int result = fixture.add(a, b);
// add additional test code here
assertEquals(2, result);
}
/**
* Run the int div(int,int) method test.
*
* @throws Exception
*
* @generatedBy CodePro at 09.08.12 13:12
*/
@Test
public void testDiv_1()
throws Exception {
Calculator fixture = new Calculator();
int a = 1;
int b = 0;
int result = fixture.div(a, b);
// add additional test code here
assertEquals(1, result);
}
/**
* Run the int mult(int,int) method test.
*
* @throws Exception
*
* @generatedBy CodePro at 09.08.12 13:12
*/
@Test
public void testMult_1()
throws Exception {
Calculator fixture = new Calculator();
int a = 1;
int b = 1;
int result = fixture.mult(a, b);
// add additional test code here
assertEquals(1, result);
}
/**
* Run the int sub(int,int) method test.
*
* @throws Exception
*
* @generatedBy CodePro at 09.08.12 13:12
*/
@Test
public void testSub_1()
throws Exception {
Calculator fixture = new Calculator();
int a = 1;
int b = 1;
int result = fixture.sub(a, b);
// add additional test code here
assertEquals(0, result);
}
/**
* Perform pre-test initialization.
*
* @throws Exception
* if the initialization fails for some reason
*
* @generatedBy CodePro at 09.08.12 13:12
*/
@Before
public void setUp()
throws Exception {
// add additional set up code here
}
/**
* Perform post-test clean-up.
*
* @throws Exception
* if the clean-up fails for some reason
*
* @generatedBy CodePro at 09.08.12 13:12
*/
@After
public void tearDown()
throws Exception {
// Add additional tear down code here
}
/**
* Launch the test.
*
* @param args the command line arguments
*
* @generatedBy CodePro at 09.08.12 13:12
*/
public static void main(String[] args) {
new org.junit.runner.JUnitCore().run(CalculatorTest.class);
}
}