respecting
By: a guest | Mar 21st, 2010 | Syntax:
None | Size: 0.65 KB | Hits: 100 | Expires: Never
public class MathOperation {
public Integer sum(int x,int y)
{
return x+y;
}
public Integer multiply(int x,int y)
{
return x*y;
}
}
import org.junit.Test;
import junit.framework.TestCase;
public class Test123 extends TestCase{
public Integer resultOfSum;
@Test
public void testSum()
{
MathOperation mo = new MathOperation();
resultOfSum = mo.sum(12, 21);
}
/**
* I want that the sum test executed first
*/
@Test
public void testMultiply()
{
MathOperation mo = new MathOperation();
Integer resultofMultiply = mo.multiply(resultOfSum, 2);
System.out.println("resultofMultiply "+resultofMultiply);
}
}