Question: An Integer will be passed to your method. Convert that Integer into a String. The first Integer will be 1. The second will be 20.

 An Integer will be passed to your method. Convert that Integer

into a String. The first Integer will be 1. The second will

An Integer will be passed to your method. Convert that Integer into a String. The first Integer will be 1. The second will be 20. The JUnit file looks like this: import org.junit.Assert: import org.junit. Test: import static org.junit. Assert.assertArrayEquals: public class MyTest @Test // method public void testOne({ // // Test 1 Input and Desired Output System.out.println("Subtest 1: input string is 1"); String stringInput = "1"; Integer intOutput = Integer.parseInt(stringInput); // send integer in, hoping that a string will be output String methodOut = Utils.intToString(intOutput); Assert. assertEquals((long)Integer.parseInt(methodOut),(long)intOutput): // // Test 2 Input and Desired Output System.out.println("Subtest 2: input string is 20"); stringInput = "20"; intOutput = Integer.parseInt(stringinput); // send integer in, hoping that a string will be output methodOut = Utils.intToString(intOutput); Assert assertEquals((long)Integer.parseInt(methodOut) (long)intOutput): } // end method }

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!