Last active
September 5, 2018 15:14
-
-
Save ParasoftExamples/8b28da81e3a3717041169fbf880cb26b to your computer and use it in GitHub Desktop.
Junit Parameterized Tests Example 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public LoanResponse requestLoan(float loanAmount, float downPayment, float availableFunds) | |
{ | |
LoanResponse response = new LoanResponse(); | |
response.setApproved(true); | |
if (availableFunds < downPayment) { | |
response.setApproved(false); | |
response.setMessage("error.insufficient.funds.for.down.payment"); | |
return response; | |
} | |
if (downPayment / loanAmount < 0.1) { | |
response.setApproved(false); | |
response.setMessage("error.insufficient.down.payment"); | |
} | |
return response; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment