Abgabe Übungstest 5
This commit is contained in:
@ -78,4 +78,19 @@ public class Aufgabe5Test {
|
||||
assertEquals(hashCode2, map.hashCode());
|
||||
assertNotEquals(hashCode1, hashCode2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDelKey() {
|
||||
MassiveForceHashMap map = new MassiveForceHashMap();
|
||||
NamedBody sun1 = new NamedBody(SolSystem4.SUN_NAMED);
|
||||
NamedBody earth1 = new NamedBody(SolSystem4.EARTH_NAMED);
|
||||
NamedBody moon1 = new NamedBody(SolSystem4.MOON_NAMED);
|
||||
map.put(sun1, new Vector3());
|
||||
map.put(earth1, new Vector3());
|
||||
map.put(moon1, new Vector3());
|
||||
assertNotNull(map.get(sun1));
|
||||
assertNotNull(map.delete(sun1));
|
||||
assertNull(map.get(sun1));
|
||||
assertNull(map.delete(sun1));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user