Question: Rewrite the following tests to remove bad smells (5 points) A. public void testWithBadSmell(){ B. } Calculator c= new Calculator(); int result = c.add(5,6);

Rewrite the following tests to remove bad smells (5 points) A. public

 

Rewrite the following tests to remove bad smells (5 points) A. public void testWithBadSmell(){ B. } Calculator c= new Calculator(); int result = c.add(5,6); assert That(result > 0); assert True(result=11); public void testWithBadSmell(){ Calculator c= new Calcultor(); int result = c.add(5,6); assert That(result, equalTo(11)); int result = c.sub(5,6); assert That(result, equalTo(-1));

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!