From 98532f28aaf944f9524d685d8b006531f904c46f Mon Sep 17 00:00:00 2001 From: Mehdi Houshmand Date: Mon, 13 Feb 2012 15:00:41 +0000 Subject: [PATCH] Corrected error in Junit4 migration git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1243549 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/fop/fo/flow/table/AllTests.java | 12 +++-- .../apache/fop/pdf/PDFLibraryTestSuite.java | 44 ++++++++----------- 2 files changed, 26 insertions(+), 30 deletions(-) diff --git a/test/java/org/apache/fop/fo/flow/table/AllTests.java b/test/java/org/apache/fop/fo/flow/table/AllTests.java index 7adca8f3a..2c9c28a62 100644 --- a/test/java/org/apache/fop/fo/flow/table/AllTests.java +++ b/test/java/org/apache/fop/fo/flow/table/AllTests.java @@ -19,16 +19,20 @@ package org.apache.fop.fo.flow.table; +import org.junit.runner.RunWith; import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; /** * All test to be added in FOTreeTestSuite * */ -@Suite.SuiteClasses({ CollapsedConditionalBorderTestCase.class, IllegalRowSpanTestCase.class, - RowGroupBuilderTestCase.class, TableColumnColumnNumberTestCase.class, +@RunWith(Suite.class) +@SuiteClasses({ + CollapsedConditionalBorderTestCase.class, + IllegalRowSpanTestCase.class, + RowGroupBuilderTestCase.class, + TableColumnColumnNumberTestCase.class, TooManyColumnsTestCase.class }) - public final class AllTests { } - diff --git a/test/java/org/apache/fop/pdf/PDFLibraryTestSuite.java b/test/java/org/apache/fop/pdf/PDFLibraryTestSuite.java index 4df325969..a0c4ea11f 100644 --- a/test/java/org/apache/fop/pdf/PDFLibraryTestSuite.java +++ b/test/java/org/apache/fop/pdf/PDFLibraryTestSuite.java @@ -19,36 +19,28 @@ package org.apache.fop.pdf; -import junit.framework.Test; -import junit.framework.TestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; /** * Test suite for FOP's utility classes. */ +@RunWith(Suite.class) +@SuiteClasses({ + PDFArrayTestCase.class, + PDFDictionaryTestCase.class, + PDFNumberTestCase.class, + PDFObjectTestCase.class, + PDFNameTestCase.class, + AbstractPDFStreamTestCase.class, + PDFDestsTestCase.class, + PDFDocumentTestCase.class, + PDFNullTestCase.class, + PDFNumsArrayTestCase.class, + PDFRectangleTestCase.class, + PDFReferenceTestCase.class +}) public class PDFLibraryTestSuite { - - /** - * Builds the test suite - * @return the test suite - */ - public static Test suite() { - TestSuite suite = new TestSuite( - "Test suite for FOP's utility classes"); - //$JUnit-BEGIN$ - suite.addTest(new TestSuite(PDFArrayTestCase.class)); - suite.addTest(new TestSuite(PDFDictionaryTestCase.class)); - suite.addTest(new TestSuite(PDFNumberTestCase.class)); - suite.addTest(new TestSuite(PDFObjectTestCase.class)); - suite.addTest(new TestSuite(PDFNameTestCase.class)); - suite.addTest(new TestSuite(AbstractPDFStreamTestCase.class)); - suite.addTest(new TestSuite(PDFDestsTestCase.class)); - suite.addTest(new TestSuite(PDFDocumentTestCase.class)); - suite.addTest(new TestSuite(PDFNullTestCase.class)); - suite.addTest(new TestSuite(PDFNumsArrayTestCase.class)); - suite.addTest(new TestSuite(PDFRectangleTestCase.class)); - suite.addTest(new TestSuite(PDFReferenceTestCase.class)); - //$JUnit-END$ - return suite; - } } -- 2.39.5