0

I have used the Assert Equals (Expected, Actual) method which takes two integers value and stores its sum in the Actual variable. I am putting my code below.

public class CalcTest 
{
    @Test
    public void test ()
        {
           Calc CT = new Calc ();
           int actual = CT.add(1,2);
           int expected = 3;
           assertEquals(expected, actual);  
        }   
    }

Expected: I want the correct code with the right output.

1
  • What do you have for the 'add' method so far? Commented Jul 1 at 17:34

0

Browse other questions tagged or ask your own question.