Question: [Java] [jUnit] Consider the class Problem3 ( drive.google.com/open?id=1NLQXL3rbKmzhsPUDnkc3DXHzuQsuMSzg ) . Create a jUnit test class which contains a method called testBinToDecEx() , which tests that
[Java] [jUnit]
Consider the class Problem3 (drive.google.com/open?id=1NLQXL3rbKmzhsPUDnkc3DXHzuQsuMSzg).
Create a jUnit test class which contains a method called testBinToDecEx(), which tests that the method binToDec properly throws an exception in the class IllegalArgumentException using the test cases below.
| Test case no | Input numBin | Output (exception or not) |
|---|---|---|
| 1 | 12 | Exception |
| 2 | Hello_World | Exception |
| 3 | 1011.1 | Exception |
| 4 | -101 | Exception |
| 5 | 1 1 0 1 | Exception |
| 6 | Exception |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
