From 00f7d40f02bb85c006a929090fb11b4b5e2e1afa Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Thu, 30 Jul 2009 21:02:41 +0000 Subject: [PATCH] CSPACE-245: Added placeholder test to forestall "could not create/run JUnit test suite" errors. --- .../services/id/IDServiceJdbcImplTest.java | 66 +++++++++++-------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/services/id/service/src/test/java/org/collectionspace/services/id/IDServiceJdbcImplTest.java b/services/id/service/src/test/java/org/collectionspace/services/id/IDServiceJdbcImplTest.java index b46fe369b..c1f94e518 100644 --- a/services/id/service/src/test/java/org/collectionspace/services/id/IDServiceJdbcImplTest.java +++ b/services/id/service/src/test/java/org/collectionspace/services/id/IDServiceJdbcImplTest.java @@ -41,34 +41,11 @@ public class IDServiceJdbcImplTest extends TestCase { IDService service = jdbc; final static String DEFAULT_CSID = "TEST-1"; - - // @TODO Read test patterns from external configuration. - public String generateSpectrumEntryNumberTestPattern() { - - pattern = new IDPattern(DEFAULT_CSID); - pattern.setDescription("SPECTRUM entry number pattern"); - pattern.setURI("urn:collectionspace:idpattern:spectrum-entry-number"); - pattern.add(new StringIDPart("E")); - pattern.add(new NumericIDPart("1")); - - return IDPatternSerializer.serialize(pattern); - - } - - // @TODO Read test patterns from external configuration. - public String generateChinAccessionNumberTestPattern() { - - pattern = new IDPattern(DEFAULT_CSID); - pattern.setDescription("CHIN accession number pattern, for items without parts"); - pattern.setURI("urn:collectionspace:idpattern:chin-accession-number-no-parts"); - pattern.add(new YearIDPart()); - pattern.add(new StringIDPart(".")); - pattern.add(new NumericIDPart("1")); - pattern.add(new StringIDPart(".")); - pattern.add(new NumericIDPart("1")); - - return IDPatternSerializer.serialize(pattern); - + + public void testPlaceholder() { + // Placeholder test to avoid "org.testng.TestNGException: + // Failure in JUnit mode ...: could not create/run JUnit test suite" + // errors until we add working tests to this class. } /* @@ -161,5 +138,38 @@ public class IDServiceJdbcImplTest extends TestCase { } */ + + // --------------------------------------------------------------- + // Utility methods used by tests above + // --------------------------------------------------------------- + + // @TODO Read test patterns from external configuration. + public String generateSpectrumEntryNumberTestPattern() { + + pattern = new IDPattern(DEFAULT_CSID); + pattern.setDescription("SPECTRUM entry number pattern"); + pattern.setURI("urn:collectionspace:idpattern:spectrum-entry-number"); + pattern.add(new StringIDPart("E")); + pattern.add(new NumericIDPart("1")); + + return IDPatternSerializer.serialize(pattern); + + } + + // @TODO Read test patterns from external configuration. + public String generateChinAccessionNumberTestPattern() { + + pattern = new IDPattern(DEFAULT_CSID); + pattern.setDescription("CHIN accession number pattern, for items without parts"); + pattern.setURI("urn:collectionspace:idpattern:chin-accession-number-no-parts"); + pattern.add(new YearIDPart()); + pattern.add(new StringIDPart(".")); + pattern.add(new NumericIDPart("1")); + pattern.add(new StringIDPart(".")); + pattern.add(new NumericIDPart("1")); + + return IDPatternSerializer.serialize(pattern); + + } } -- 2.47.3