public void testConstruct0() { // the types of these maps OneToManyMap<String, Integer> map0 = new OneToManyMap<>(); assertNotNull( map0 ); assertTrue( map0.isEmpty() ); OneToManyMap<String, Integer> map1 = new OneToManyMap<>( map0 ); assertNotNull( map1 ); assertTrue( map1.isEmpty() ); }
public void testConstruct0() { // the types of these maps OneToManyMap<String, Integer> map0 = new OneToManyMap<>(); assertNotNull( map0 ); assertTrue( map0.isEmpty() ); OneToManyMap<String, Integer> map1 = new OneToManyMap<>( map0 ); assertNotNull( map1 ); assertTrue( map1.isEmpty() ); }
public void testConstruct1() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); map0.put( s0, s1 ); assertTrue( map0.contains( s0, s1 ) ); OneToManyMap<String, String> map1 = new OneToManyMap<>( map0 ); assertTrue( map1.contains( s0, s1 ) ); map0.put( s0, s2 ); assertTrue( map0.contains( s0, s2 ) ); assertFalse( map1.contains( s0, s2 ) ); assertFalse( map0.contains( s1, s2 ) ); }
public void testConstruct1() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); map0.put( s0, s1 ); assertTrue( map0.contains( s0, s1 ) ); OneToManyMap<String, String> map1 = new OneToManyMap<>( map0 ); assertTrue( map1.contains( s0, s1 ) ); map0.put( s0, s2 ); assertTrue( map0.contains( s0, s2 ) ); assertFalse( map1.contains( s0, s2 ) ); assertFalse( map0.contains( s1, s2 ) ); }
public void testClear() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); map0.put( s0, s1 ); assertTrue( map0.contains( s0, s1 ) ); assertFalse( map0.isEmpty() ); map0.clear(); assertFalse( map0.contains( s0, s1 ) ); assertTrue( map0.isEmpty() ); }
public void testClear() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); map0.put( s0, s1 ); assertTrue( map0.contains( s0, s1 ) ); assertFalse( map0.isEmpty() ); map0.clear(); assertFalse( map0.contains( s0, s1 ) ); assertTrue( map0.isEmpty() ); }
public void testGet() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); assertNull( map0.get( s0 )); map0.put( s0, s1 ); assertEquals( s1, map0.get( s0 )); map0.put( s0, s2 ); assertTrue( map0.get( s0 ).equals( s1 ) || map0.get( s0 ).equals( s2 )); }
public void testGet() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); assertNull( map0.get( s0 )); map0.put( s0, s1 ); assertEquals( s1, map0.get( s0 )); map0.put( s0, s2 ); assertTrue( map0.get( s0 ).equals( s1 ) || map0.get( s0 ).equals( s2 )); }
public void testRemove0() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); map0.put( s0, s1 ); map0.put( s3, s4 ); map0.remove( s0 ); map0.remove( s3 ); assertTrue( map0.isEmpty() ); }
public void testRemove0() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); map0.put( s0, s1 ); map0.put( s3, s4 ); map0.remove( s0 ); map0.remove( s3 ); assertTrue( map0.isEmpty() ); }
public void testContainsValue() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); assertFalse( map0.containsValue( s0 ) ); assertFalse( map0.containsValue( s1 ) ); assertFalse( map0.containsValue( s2 ) ); map0.put( s0, s1 ); assertFalse( map0.containsValue( s0 ) ); assertTrue( map0.containsValue( s1 ) ); assertFalse( map0.containsValue( s2 ) ); map0.put( s0, s2 ); assertFalse( map0.containsValue( s0 ) ); assertTrue( map0.containsValue( s1 ) ); assertTrue( map0.containsValue( s2 ) ); }
public void testContains() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); assertFalse( map0.contains( s0, s1 ) ); assertFalse( map0.contains( s0, s2 ) ); assertFalse( map0.contains( s1, s2 ) ); map0.put( s0, s1 ); assertTrue( map0.contains( s0, s1 ) ); assertFalse( map0.contains( s0, s2 ) ); assertFalse( map0.contains( s1, s2 ) ); map0.put( s0, s2 ); assertTrue( map0.contains( s0, s1 ) ); assertTrue( map0.contains( s0, s2 ) ); assertFalse( map0.contains( s1, s2 ) ); }
public void testContainsValue() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); assertFalse( map0.containsValue( s0 ) ); assertFalse( map0.containsValue( s1 ) ); assertFalse( map0.containsValue( s2 ) ); map0.put( s0, s1 ); assertFalse( map0.containsValue( s0 ) ); assertTrue( map0.containsValue( s1 ) ); assertFalse( map0.containsValue( s2 ) ); map0.put( s0, s2 ); assertFalse( map0.containsValue( s0 ) ); assertTrue( map0.containsValue( s1 ) ); assertTrue( map0.containsValue( s2 ) ); }
public void testContains() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); assertFalse( map0.contains( s0, s1 ) ); assertFalse( map0.contains( s0, s2 ) ); assertFalse( map0.contains( s1, s2 ) ); map0.put( s0, s1 ); assertTrue( map0.contains( s0, s1 ) ); assertFalse( map0.contains( s0, s2 ) ); assertFalse( map0.contains( s1, s2 ) ); map0.put( s0, s2 ); assertTrue( map0.contains( s0, s1 ) ); assertTrue( map0.contains( s0, s2 ) ); assertFalse( map0.contains( s1, s2 ) ); }
public void testEquals() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); map0.put( s0, s1 ); map0.put( s0, s2 ); map0.put( s3, s4 ); OneToManyMap<String, String> map1 = new OneToManyMap<>(); map1.put( s3, s4 ); map1.put( s0, s1 ); map1.put( s0, s2 ); OneToManyMap<String, String> map2 = new OneToManyMap<>(); map2.put( s0, s2 ); map2.put( s3, s4 ); assertTrue( map0.equals( map1 ) ); assertTrue( map1.equals( map0 ) ); assertTrue( map0.hashCode() == map1.hashCode() ); assertFalse( map0.equals( map2 )); assertFalse( map2.equals( map0 )); }
public void testEquals() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); map0.put( s0, s1 ); map0.put( s0, s2 ); map0.put( s3, s4 ); OneToManyMap<String, String> map1 = new OneToManyMap<>(); map1.put( s3, s4 ); map1.put( s0, s1 ); map1.put( s0, s2 ); OneToManyMap<String, String> map2 = new OneToManyMap<>(); map2.put( s0, s2 ); map2.put( s3, s4 ); assertTrue( map0.equals( map1 ) ); assertTrue( map1.equals( map0 ) ); assertTrue( map0.hashCode() == map1.hashCode() ); assertFalse( map0.equals( map2 )); assertFalse( map2.equals( map0 )); }
public void testContainsKey() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); assertFalse( map0.containsKey( s0 ) ); assertFalse( map0.containsKey( s1 ) ); map0.put( s0, s1 ); assertTrue( map0.containsKey( s0 ) ); assertFalse( map0.containsKey( s1 ) ); }
public void testContainsKey() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); assertFalse( map0.containsKey( s0 ) ); assertFalse( map0.containsKey( s1 ) ); map0.put( s0, s1 ); assertTrue( map0.containsKey( s0 ) ); assertFalse( map0.containsKey( s1 ) ); }
public void testRemove1() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); map0.put( s0, s1 ); map0.put( s0, s2 ); map0.put( s3, s4 ); map0.remove( s0, s2 ); map0.remove( s3, s4 ); assertFalse( map0.isEmpty() ); map0.remove( s0, s1 ); assertTrue( map0.isEmpty() ); }
public void testRemove1() { OneToManyMap<String, String> map0 = new OneToManyMap<>(); map0.put( s0, s1 ); map0.put( s0, s2 ); map0.put( s3, s4 ); map0.remove( s0, s2 ); map0.remove( s3, s4 ); assertFalse( map0.isEmpty() ); map0.remove( s0, s1 ); assertTrue( map0.isEmpty() ); }