Question: JUnit (JUnit 5) tests for the following methods in Java: setVerion should have 3 test methods (MAX_VERSION = 4) getFormattedPrice should have 2 test methods
JUnit (JUnit 5) tests for the following methods in Java:
setVerion should have 3 test methods (MAX_VERSION = 4)
getFormattedPrice should have 2 test methods
Thank you!

public void setVersion (double version) throws Version NumberException { if (version > MAX_VERSION) { throw new Version NumberException (Double.toString(version)); } this.version = version; } public String getFormattedPrice() return "$" + DecimalFormat.getInstance().format(price); } public void setVersion (double version) throws Version NumberException { if (version > MAX_VERSION) { throw new Version NumberException (Double.toString(version)); } this.version = version; } public String getFormattedPrice() return "$" + DecimalFormat.getInstance().format(price); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
