@Test public void keyValuePair_equals_strStr_plasiboPlasibo() { final KeyValuePair<String, String> REF = STR_STR_PLASIBO_PLASIBO; final KeyValuePair<String, String> keyValuePair = new KeyValuePair<String, String>(); assertNotNull("KeyValuePair should not be null", keyValuePair); keyValuePair.setKey("plasibo"); keyValuePair.setValue(""); assertFalse("Unexpected KeyValuePair.equals(Object)", REF.equals(keyValuePair)); keyValuePair.setValue(null); assertFalse("Unexpected KeyValuePair.equals(Object)", REF.equals(keyValuePair)); keyValuePair.setValue("plasibo"); assertTrue("Unexpected KeyValuePair.equals(Object)", REF.equals(keyValuePair)); }
@Test public void keyValuePair_equals_strBoo_plasiboTRUE() { final KeyValuePair<String, Boolean> REF = STR_BOO_PLASIBO_TRUE; final KeyValuePair<String, Boolean> keyValuePair = new KeyValuePair<String, Boolean>(); assertNotNull("KeyValuePair should not be null", keyValuePair); keyValuePair.setKey("plasibo"); keyValuePair.setValue(false); assertFalse("Unexpected KeyValuePair.equals(Object)", REF.equals(keyValuePair)); keyValuePair.setValue(null); assertFalse("Unexpected KeyValuePair.equals(Object)", REF.equals(keyValuePair)); keyValuePair.setValue(true); assertTrue("Unexpected KeyValuePair.equals(Object)", REF.equals(keyValuePair)); }
@Test public void keyValuePair_equals_strInt_plasiboZero() { final KeyValuePair<String, Integer> REF = STR_INT_PLASIBO_ZERO; final KeyValuePair<String, Integer> keyValuePair = new KeyValuePair<String, Integer>(); assertNotNull("KeyValuePair should not be null", keyValuePair); keyValuePair.setKey("plasibo"); keyValuePair.setValue(Integer.MAX_VALUE); assertFalse("Unexpected KeyValuePair.equals(Object)", REF.equals(keyValuePair)); keyValuePair.setValue(Integer.MIN_VALUE); assertFalse("Unexpected KeyValuePair.equals(Object)", REF.equals(keyValuePair)); keyValuePair.setValue(null); assertFalse("Unexpected KeyValuePair.equals(Object)", REF.equals(keyValuePair)); keyValuePair.setValue(0); assertTrue("Unexpected KeyValuePair.equals(Object)", REF.equals(keyValuePair)); }