elvyssoares

Magic Number Test - Refactored - Toy Example

Jun 10th, 2020
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.29 KB | None | 0 0
  1. final int FIRST_VALUE = 1;
  2. final int LAST_VALUE = 3653;
  3. @Test
  4. public void test() {
  5.     Map map = new Map();
  6.     Key key = new Key();
  7.     map.set(key, LAST_VALUE);
  8.     assertThat(map.get(key)).isEqualTo(LAST_VALUE);
  9.     map.set(key, FIRST_VALUE);
  10.     assertThat(map.get(key)).isEqualTo(FIRST_VALUE);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment