Question: Unit Testing JAVA public static string getTriangleType ( int a , int b , int c ) { if ( ! isValidTriangle ( a ,
Unit Testing
JAVA
public static string getTriangleTypeint int int c
if isValidTriangle
throw new IllegalArgumentExceptionNot Valid Triangle";
if
return "Equilateral";
else if
return "Isosceles";
else
return "Scalene";
What is the cyclomatic complexity for the getTriangleType method?
Write a unit test case for the getTriangleType method in Triangle class that would test the following path:
The test case should look like the test cases you have written for your test programs in class assertEquals with message
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
