ART B: JUnit Testing Write a Java program according to the following: Create a Multiple.java class. Create the following two static methods (with return type float): SquareRoot() and CubeRoot(). SquareRoot) method should take two arguments and return the float value at the end. CubeRoot() method should take three arguments and return the float value at the end. Create a test class with the name MultipleTest.java. In this class, import the following libraries at the top of this file import org.junit. Before; import org.junit. Test; import static org.junit.Assert.assertEquals; Create an object of Calculator.java class by writing the following code in CalculatorTest.java class: private Multiple multiple; @Before public void setup() {this.multiple new Multiple():) 4. Generate the JUnit test classes for both the methods one by one. Declare and initialize the required variables to pass those to the methods. Store the expected result in one of the variables and then compare it with the actual returned value of the specific function. After creating the required JUnit test cases for SquareRoot() and CubeRoot(), run all the test cases one by one. Check the output. All the test cases should be passed at the end
PART B: JUnit Testing Write a Java program according to the following: Create a Multiple.java class. Create the following two static methods (with return type float): SquareRoot() and CubeRoot(). SquareRoot) method should take two arguments and return the float value at the end. CubeRoot() method should take three arguments and return the float value at the end. Create a test class with the name MultipleTest.java. In this class, import the following libraries at the top of this file import org.junit. Before; import org.junit. Test; import static org.junit.Assert.assertEquals; Create an object of Calculator.java class by writing the following code in CalculatorTest.java class: private Multiple multiple; @Before public void setup() {this.multiple new Multiple():) 4. Generate the JUnit test classes for both the methods one by one. Declare and initialize the required variables to pass those to the methods. Store the expected result in one of the variables and then compare it with the actual returned value of the specific function. After creating the required JUnit test cases for SquareRoot() and CubeRoot(), run all the test cases one by one. Check the output. All the test cases should be passed at the end
Step by step
Solved in 3 steps