| | |
| | | } |
| | | |
| | | /** |
| | | * Creates data for testing string-based limit values |
| | | * Creates data for testing string-based limit values. |
| | | * |
| | | * @return data |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Creates data for testing limit values |
| | | * Creates data for testing limit values. |
| | | * |
| | | * @return data |
| | | */ |
| | |
| | | assertEquals(def.encodeValue(valueToEncode), expectedValue); |
| | | } |
| | | |
| | | /** Test that accept doesn't throw and exception */ |
| | | /** Test that accept doesn't throw and exception. */ |
| | | @Test |
| | | public void testAccept() { |
| | | DurationPropertyDefinition.Builder builder = createTestBuilder(); |
| | |
| | | assertEquals((boolean) def.accept(v, null), true); |
| | | } |
| | | |
| | | /** Make sure toString doesn't barf */ |
| | | /** Make sure toString doesn't barf. */ |
| | | @Test |
| | | public void testToString() { |
| | | DurationPropertyDefinition.Builder builder = createTestBuilder(); |
| | |
| | | def.toString(); |
| | | } |
| | | |
| | | /** Make sure toString doesn't barf */ |
| | | /** Make sure toString doesn't barf. */ |
| | | @Test |
| | | public void testToString2() { |
| | | DurationPropertyDefinition.Builder builder = createTestBuilder(); |