Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import junit.framework.TestCase;
- import java.util.Map;
- import java.util.TreeMap;
- public class ArrowAntiPatternTest extends TestCase {
- public void test() {
- final var testCases = new TreeMap<Integer, String>() {{
- put(999, "A");
- put(100, "A");
- put(91, "A");
- put(90, "A");
- put(89, "B");
- put(80, "B");
- put(79, "C");
- put(70, "C");
- put(69, "D");
- put(60, "D");
- put(59, "F");
- put(1, "F");
- put(0, "F");
- put(-1, "F");
- put(-10, "F");
- put(-100, "F");
- }};
- for (Map.Entry<Integer, String> testCase : testCases.entrySet()) {
- final var score = testCase.getKey();
- assertEquals("Grade for score <" + score + ">;",
- testCase.getValue(), ArrowAntiPattern.checkGrade(score));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement