To be able to complete the exercises related to EasyMock, you will need to download its library and make sure that it is in JUnit’s path. Let us now play with the code given in Example XXXXXXXXXXa)...

To be able to complete the exercises related to EasyMock, you will need to download its library and make sure that it is in JUnit’s path. Let us now play with the code given in Example 10.3. (a) Select any passing test and try to make it fail. (b) Modify the ExpertInterface to add the following method. public double enhancedCompute(double x) Now modify compute() in class Compute so that when request=3, enhancedCompute must be called followed by save. (c) Assume that when request=4, enhancedCompute() is called twice. In the first call the parameter x is input. In the following call the value returned from the first call is input. These two calls are followed by a call to save the final result. Now create a test to check if this call sequence was exercised. (d) Suppose that when x



May 26, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here