Question: Write one JUnit test class (with assertions, e.g., assertEquals and/or assert True) to test the follow- ing mid function with concrete test inputs. Please
Write one JUnit test class (with assertions, e.g., assertEquals and/or assert True) to test the follow- ing "mid" function with concrete test inputs. Please use test fixture, and mark the corresponding code portions with the following software testing concepts: test case, test fixture, and test oracle. Your tests should be able to cover all the possible program statements within "mid". Note that you should not use parameterized tests. public class Test Me ( public int mid (int x, int y, int z) { } int m= z; if (y y) m = y; else if (x > Z) m = x; return m;
Step by Step Solution
There are 3 Steps involved in it
the corrected and improved code with comments Java public class TestMid Test fixture Provides shared ... View full answer
Get step-by-step solutions from verified subject matter experts
