/** * Tests decodeValue() with illegal data * * @param value to decode */ @Test( dataProvider = "testDecodeValueData2", expectedExceptions = {AssertionError.class, IllegalPropertyValueStringException.class}) public void testDecodeValue2(String value) { BooleanPropertyDefinition d = createPropertyDefinition(); d.decodeValue(value); }
/** * Tests decodeValue() with illegal data. * * @param value to decode */ @Test( dataProvider = "testDecodeValueData2", expectedExceptions = {NullPointerException.class, PropertyException.class}) public void testDecodeValue2(String value) { BooleanPropertyDefinition d = createPropertyDefinition(); d.decodeValue(value); }
/** * Tests decodeValue() * * @param value to decode * @param expected value */ @Test(dataProvider = "testDecodeValueData") public void testDecodeValue(String value, Boolean expected) { BooleanPropertyDefinition d = createPropertyDefinition(); assertEquals(d.decodeValue(value), expected); }