@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_hashCode_strStr_emptyPlasibo() { final KeyValuePair<String, String> keyValuePair = new KeyValuePair<String, String>(); assertNotNull("KeyValuePair should not be null", keyValuePair); keyValuePair.setValue("Plasibo"); final int keyValuePairHashCode = keyValuePair.hashCode(); assertEquals("Unexpected KeyValuePair.hashCode()", 1108021822, keyValuePairHashCode); }
@Test public void keyValuePair_getValue_strStr_emptyPlasibo() { final KeyValuePair<String, String> keyValuePair = new KeyValuePair<String, String>(); assertNotNull("KeyValuePair should not be null", keyValuePair); keyValuePair.setValue("Plasibo"); final String string = keyValuePair.getValue(); assertEquals("Unexpected KeyValuePair.getValue()", "Plasibo", string); }
@Test public void keyValuePair_getValue_strInt_emptyZero() { final KeyValuePair<String, Integer> keyValuePair = new KeyValuePair<String, Integer>(); assertNotNull("KeyValuePair should not be null", keyValuePair); keyValuePair.setValue(0); final Integer integer = keyValuePair.getValue(); assertEquals("Unexpected KeyValuePair.getValue()", Integer.valueOf(0), integer); }
@Test public void keyValuePair_getValue_strInt_emptyNULL() { final KeyValuePair<String, Integer> keyValuePair = new KeyValuePair<String, Integer>(); assertNotNull("KeyValuePair should not be null", keyValuePair); keyValuePair.setValue(null); final Integer integer = keyValuePair.getValue(); assertNull("Unexpected KeyValuePair.getValue()", integer); }
@Test public void keyValuePair_getValue_strBoo_emptyTRUE() { final KeyValuePair<String, Boolean> keyValuePair = new KeyValuePair<String, Boolean>(); assertNotNull("KeyValuePair should not be null", keyValuePair); keyValuePair.setValue(true); final Boolean bool = keyValuePair.getValue(); assertEquals("Unexpected KeyValuePair.getValue()", Boolean.TRUE, bool); }
@Test public void keyValuePair_hashCode_strInt_plasiboZero() { final KeyValuePair<String, Integer> keyValuePair = new KeyValuePair<String, Integer>(); assertNotNull("KeyValuePair should not be null", keyValuePair); keyValuePair.setKey("Plasibo"); keyValuePair.setValue(0); final int keyValuePairHashCode = keyValuePair.hashCode(); assertEquals("Unexpected KeyValuePair.hashCode()", 311120094, keyValuePairHashCode); }
@Test public void keyValuePair_hashCode_strInt_plasiboMIN() { final KeyValuePair<String, Integer> keyValuePair = new KeyValuePair<String, Integer>(); assertNotNull("KeyValuePair should not be null", keyValuePair); keyValuePair.setKey("Plasibo"); keyValuePair.setValue(Integer.MIN_VALUE); final int keyValuePairHashCode = keyValuePair.hashCode(); assertEquals("Unexpected KeyValuePair.hashCode()", -1836363554, keyValuePairHashCode); }
@Test public void keyValuePair_hashCode_strBoo_plasiboTRUE() { final KeyValuePair<String, Boolean> keyValuePair = new KeyValuePair<String, Boolean>(); assertNotNull("KeyValuePair should not be null", keyValuePair); keyValuePair.setKey("Plasibo"); keyValuePair.setValue(true); final int keyValuePairHashCode = keyValuePair.hashCode(); assertEquals("Unexpected KeyValuePair.hashCode()", 311121325, keyValuePairHashCode); }
@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)); }