JeffGrigg icon

Untitled

JeffGrigg | PRO | 04/13/24 10:21:27 PM UTC | 0 ⭐ | 12872 👁️ | Never ⏰ | []
Java 5 |

0 B

|

None

|

0 👍

/

0 👎

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));
        }
    }
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎