From a94c41b1759c23f849376a5f5448bc6e819f1c11 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Sat, 18 Jan 2014 00:58:42 +0000
Subject: [PATCH] Simplify config framework exception hierarchy by removing and pulling up the following exceptions:
---
opendj-config/src/test/java/org/forgerock/opendj/config/DurationPropertyDefinitionTest.java | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/opendj-config/src/test/java/org/forgerock/opendj/config/DurationPropertyDefinitionTest.java b/opendj-config/src/test/java/org/forgerock/opendj/config/DurationPropertyDefinitionTest.java
index 97a7796..f8b584c 100644
--- a/opendj-config/src/test/java/org/forgerock/opendj/config/DurationPropertyDefinitionTest.java
+++ b/opendj-config/src/test/java/org/forgerock/opendj/config/DurationPropertyDefinitionTest.java
@@ -127,7 +127,7 @@
def.decodeValue("unlimited", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
}
- @Test(expectedExceptions = IllegalPropertyValueStringException.class)
+ @Test(expectedExceptions = PropertyException.class)
public void testAllowUnlimitedIsFalse() {
DurationPropertyDefinition.Builder builder = createTestBuilder();
builder.setAllowUnlimited(false);
@@ -135,7 +135,7 @@
def.decodeValue("unlimited", PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
}
- @Test(expectedExceptions = IllegalPropertyValueException.class)
+ @Test(expectedExceptions = PropertyException.class)
public void testAllowUnlimitedIsFalseNumValue() {
DurationPropertyDefinition.Builder builder = createTestBuilder();
builder.setAllowUnlimited(false);
@@ -177,7 +177,7 @@
}
@Test(dataProvider = "illegalValidateValueData", expectedExceptions = { AssertionError.class,
- NullPointerException.class, IllegalPropertyValueException.class })
+ NullPointerException.class, PropertyException.class })
public void testValidateValueIllegal(Long lowLimitInMillis, Long highLimitInMillis,
boolean isAllowUnlimited, Long valueInSeconds) {
DurationPropertyDefinition.Builder builder = createTestBuilder();
@@ -224,7 +224,7 @@
return true;
}
@SuppressWarnings("unused")
- public Boolean visitUnknown(PropertyDefinition<?> d, Void o) throws UnknownPropertyDefinitionException {
+ public Boolean visitUnknown(PropertyDefinition<?> d, Void o) throws PropertyException {
return false;
}
};
@@ -329,7 +329,7 @@
};
}
- @Test(dataProvider = "decodeValueDataIllegal", expectedExceptions = { IllegalPropertyValueStringException.class })
+ @Test(dataProvider = "decodeValueDataIllegal", expectedExceptions = { PropertyException.class })
public void testDecodeValue(String valueToDecode) {
DurationPropertyDefinition.Builder builder = createTestBuilder();
builder.setAllowUnlimited(false);
--
Gitblit v1.10.0