From 9273cfaf7ac375bb07ba8e0c9945ce3c72c1e3e2 Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Thu, 5 Nov 2009 04:38:40 +0000 Subject: [PATCH] CSPACE-534: Replaced inappropriate references to IllegalArgumentExceptions with BadRequestExceptions in one additional test class, missed in the original check-in. --- .../services/id/test/SettableIDGeneratorTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/services/id/service/src/test/java/org/collectionspace/services/id/test/SettableIDGeneratorTest.java b/services/id/service/src/test/java/org/collectionspace/services/id/test/SettableIDGeneratorTest.java index c85b1b1be..2591bf38f 100644 --- a/services/id/service/src/test/java/org/collectionspace/services/id/test/SettableIDGeneratorTest.java +++ b/services/id/service/src/test/java/org/collectionspace/services/id/test/SettableIDGeneratorTest.java @@ -24,6 +24,7 @@ package org.collectionspace.services.id.test; import junit.framework.TestCase; +import org.collectionspace.services.common.repository.BadRequestException; import org.collectionspace.services.id.*; /** @@ -43,7 +44,7 @@ public class SettableIDGeneratorTest extends TestCase { // if any initialization of new IDParts fails // due to invalid arguments passed to their constructors. - public void testCurrentIDWithPartialSuppliedID() { + public void testCurrentIDWithPartialSuppliedID() throws BadRequestException { generator.clear(); generator.add(new StringIDGeneratorPart("E")); generator.add(new NumericIDGeneratorPart("1")); @@ -92,7 +93,7 @@ public class SettableIDGeneratorTest extends TestCase { } - public void testCurrentIDWithFullSuppliedID() { + public void testCurrentIDWithFullSuppliedID() throws BadRequestException { generator.clear(); generator.add(new YearIDGeneratorPart("2009")); generator.add(new StringIDGeneratorPart(".")); @@ -110,7 +111,7 @@ public class SettableIDGeneratorTest extends TestCase { assertEquals("2009.1-b", generator.newID()); } - public void testNewIDWithTrailingConstantStringID() { + public void testNewIDWithTrailingConstantStringID() throws BadRequestException { generator.clear(); generator.add(new YearIDGeneratorPart()); generator.add(new StringIDGeneratorPart(".")); @@ -120,7 +121,7 @@ public class SettableIDGeneratorTest extends TestCase { assertEquals(CURRENT_YEAR + ".1-", generator.newID()); } - public void testNewIDWithSuppliedID() { + public void testNewIDWithSuppliedID() throws BadRequestException { generator.clear(); generator.add(new YearIDGeneratorPart("2009")); generator.add(new StringIDGeneratorPart(".")); -- 2.47.3