From 994bf9485a22ce6a0a883b72e5978e7b34ce2572 Mon Sep 17 00:00:00 2001 From: Simon Steiner Date: Thu, 9 Jun 2022 10:54:29 +0000 Subject: Fix test names git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1901776 13f79535-47bb-0310-9956-ffa450edef68 --- .../configuration/DefaultConfigurationTest.java | 47 ---------------------- .../DefaultConfigurationTestCase.java | 47 ++++++++++++++++++++++ .../org/apache/fop/pdf/PDFLibraryTestSuite.java | 4 +- .../extensions/PDFEmbeddedFileAttachmentTest.java | 42 ------------------- .../PDFEmbeddedFileAttachmentTestCase.java | 42 +++++++++++++++++++ 5 files changed, 91 insertions(+), 91 deletions(-) delete mode 100644 fop-core/src/test/java/org/apache/fop/configuration/DefaultConfigurationTest.java create mode 100644 fop-core/src/test/java/org/apache/fop/configuration/DefaultConfigurationTestCase.java delete mode 100644 fop-core/src/test/java/org/apache/fop/render/pdf/extensions/PDFEmbeddedFileAttachmentTest.java create mode 100644 fop-core/src/test/java/org/apache/fop/render/pdf/extensions/PDFEmbeddedFileAttachmentTestCase.java (limited to 'fop-core/src/test') diff --git a/fop-core/src/test/java/org/apache/fop/configuration/DefaultConfigurationTest.java b/fop-core/src/test/java/org/apache/fop/configuration/DefaultConfigurationTest.java deleted file mode 100644 index f25df7e39..000000000 --- a/fop-core/src/test/java/org/apache/fop/configuration/DefaultConfigurationTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.fop.configuration; - -import org.junit.Before; -import org.junit.Test; - -import static org.junit.Assert.assertEquals; - -public class DefaultConfigurationTest { - - DefaultConfiguration configuration; - - @Before - public void setup() throws Exception { - DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(); - configuration = builder.build(getClass().getResourceAsStream("sample_config.xml")); - } - - @Test - public void testGetChild() { - Configuration fontsConfig = configuration.getChild("fonts"); - assertEquals("fonts element should be direct child", "fop/fonts", fontsConfig.getLocation()); - } - - @Test - public void testGetChildren() { - Configuration[] fontsConfig = configuration.getChildren("fonts"); - assertEquals("only direct children should match", 1, fontsConfig.length); - assertEquals("fonts element should be direct child", "fop/fonts", fontsConfig[0].getLocation()); - } -} diff --git a/fop-core/src/test/java/org/apache/fop/configuration/DefaultConfigurationTestCase.java b/fop-core/src/test/java/org/apache/fop/configuration/DefaultConfigurationTestCase.java new file mode 100644 index 000000000..2500998ea --- /dev/null +++ b/fop-core/src/test/java/org/apache/fop/configuration/DefaultConfigurationTestCase.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.configuration; + +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +public class DefaultConfigurationTestCase { + + DefaultConfiguration configuration; + + @Before + public void setup() throws Exception { + DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(); + configuration = builder.build(getClass().getResourceAsStream("sample_config.xml")); + } + + @Test + public void testGetChild() { + Configuration fontsConfig = configuration.getChild("fonts"); + assertEquals("fonts element should be direct child", "fop/fonts", fontsConfig.getLocation()); + } + + @Test + public void testGetChildren() { + Configuration[] fontsConfig = configuration.getChildren("fonts"); + assertEquals("only direct children should match", 1, fontsConfig.length); + assertEquals("fonts element should be direct child", "fop/fonts", fontsConfig[0].getLocation()); + } +} diff --git a/fop-core/src/test/java/org/apache/fop/pdf/PDFLibraryTestSuite.java b/fop-core/src/test/java/org/apache/fop/pdf/PDFLibraryTestSuite.java index 3b0043aea..2f7fccc3a 100644 --- a/fop-core/src/test/java/org/apache/fop/pdf/PDFLibraryTestSuite.java +++ b/fop-core/src/test/java/org/apache/fop/pdf/PDFLibraryTestSuite.java @@ -23,7 +23,7 @@ import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; -import org.apache.fop.render.pdf.extensions.PDFEmbeddedFileAttachmentTest; +import org.apache.fop.render.pdf.extensions.PDFEmbeddedFileAttachmentTestCase; /** * Test suite for FOP's utility classes. @@ -47,7 +47,7 @@ import org.apache.fop.render.pdf.extensions.PDFEmbeddedFileAttachmentTest; VersionControllerTestCase.class, PDFRootTestCase.class, PDFFileSpecTestCase.class, - PDFEmbeddedFileAttachmentTest.class + PDFEmbeddedFileAttachmentTestCase.class }) public class PDFLibraryTestSuite { } diff --git a/fop-core/src/test/java/org/apache/fop/render/pdf/extensions/PDFEmbeddedFileAttachmentTest.java b/fop-core/src/test/java/org/apache/fop/render/pdf/extensions/PDFEmbeddedFileAttachmentTest.java deleted file mode 100644 index 6f6c90259..000000000 --- a/fop-core/src/test/java/org/apache/fop/render/pdf/extensions/PDFEmbeddedFileAttachmentTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* $Id: PDFRenderingUtil.java 1761019 2016-09-16 10:43:45Z ssteiner $ */ - -package org.apache.fop.render.pdf.extensions; - -import org.junit.Test; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; - -public class PDFEmbeddedFileAttachmentTest { - - @Test - public void testGetFilename() { - String germanAe = "\u00E4"; - String unicodeFilename = "t" + germanAe + "st"; - String src = "src"; - String desc = "desc"; - PDFEmbeddedFileAttachment fileAtt = new PDFEmbeddedFileAttachment(unicodeFilename, src, desc); - assertEquals(fileAtt.getUnicodeFilename(), unicodeFilename); - assertFalse(fileAtt.getFilename().contains(germanAe)); - assertEquals(fileAtt.getSrc(), src); - assertEquals(fileAtt.getDesc(), desc); - } - -} diff --git a/fop-core/src/test/java/org/apache/fop/render/pdf/extensions/PDFEmbeddedFileAttachmentTestCase.java b/fop-core/src/test/java/org/apache/fop/render/pdf/extensions/PDFEmbeddedFileAttachmentTestCase.java new file mode 100644 index 000000000..d73160d6f --- /dev/null +++ b/fop-core/src/test/java/org/apache/fop/render/pdf/extensions/PDFEmbeddedFileAttachmentTestCase.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* $Id: PDFRenderingUtil.java 1761019 2016-09-16 10:43:45Z ssteiner $ */ + +package org.apache.fop.render.pdf.extensions; + +import org.junit.Test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; + +public class PDFEmbeddedFileAttachmentTestCase { + + @Test + public void testGetFilename() { + String germanAe = "\u00E4"; + String unicodeFilename = "t" + germanAe + "st"; + String src = "src"; + String desc = "desc"; + PDFEmbeddedFileAttachment fileAtt = new PDFEmbeddedFileAttachment(unicodeFilename, src, desc); + assertEquals(fileAtt.getUnicodeFilename(), unicodeFilename); + assertFalse(fileAtt.getFilename().contains(germanAe)); + assertEquals(fileAtt.getSrc(), src); + assertEquals(fileAtt.getDesc(), desc); + } + +} -- cgit v1.2.3