Skip to content

Commit

Permalink
Simplify test
Browse files Browse the repository at this point in the history
Sort new method
  • Loading branch information
garydgregory committed Jan 29, 2024
1 parent 91bf05b commit 0573544
Showing 1 changed file with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ public void tearDown() {
map = null;
}

/**
* Attempts to create a ConfigurationMap with null configuration. This should cause an exception.
*/
@Test
public void testNullConfig() {
assertThrows(NullPointerException.class, () -> new ConfigurationMap(null));
}

/**
* Class under test for Object put(Object, Object)
*/
Expand All @@ -71,16 +79,4 @@ public void testPut() {
}
}

/**
* Attempts to create a ConfigurationMap with null configuration.
* This should cause an exception.
*/
@Test
public void testNullConfig() {
assertThrows(NullPointerException.class, () -> {
final Configuration cf = null;
new ConfigurationMap(cf);
});
}

}

0 comments on commit 0573544

Please sign in to comment.