How can I assert on a Java Hashmap of Arrays?
I'm building a new hashmap ( < String , String[] > ) by combining three
other hashmaps ( < String , String > ) and adding the filename. How do I
assert the new hashmap is correct? The nested array is making the test
fail.
This code is a simplified example of my failing test:
@Test
public void injectArrayIntoHashMap() {
HashMap map = new HashMap();
map.put("hi", new String[] { "hello", "howdy" });
HashMap newMap = new HashMap();
newMap.put("hi", new String[] { "hello", "howdy" });
assertEquals(map, newMap);
}
No comments:
Post a Comment