You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by tf...@apache.org on 2010/09/07 21:18:34 UTC
svn commit: r993488 - in
/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator:
configuration/ configuration/outlet/ file/ outlet/java/ source/
source/jdbc/ source/properties/ source/stream/
Author: tfischer
Date: Tue Sep 7 19:18:33 2010
New Revision: 993488
URL: http://svn.apache.org/viewvc?rev=993488&view=rev
Log:
- removed trailing spaces
- added missing license headers
Modified:
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ClasspathConfigurationProviderTest.java
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ConfigurationTestSkipDecider.java
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ConfigurationTestTransformer.java
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/OtherConfigurationTestSkipDecider.java
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/OtherConfigurationTestTransformer.java
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationTest.java
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/file/FileTestUtils.java
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/file/FilesetTest.java
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/JavadocOutletTest.java
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/XmlOutletTest.java
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/RichSourceElementImplTest.java
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSourceTest.java
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/properties/PropertiesParserTest.java
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/FileSourceProviderTest.java
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/SourceToXmlTest.java
db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/XmlParserTest.java
Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ClasspathConfigurationProviderTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ClasspathConfigurationProviderTest.java?rev=993488&r1=993487&r2=993488&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ClasspathConfigurationProviderTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ClasspathConfigurationProviderTest.java Tue Sep 7 19:18:33 2010
@@ -45,12 +45,12 @@ public class ClasspathConfigurationProvi
public void before()
{
ProjectPaths projectPaths = new CustomProjectPaths(
- null,
+ null,
"org.apache.torque.generator.test.readfromclasspath",
new File("src"),
new File("target"),
new File("generated-sources"));
-
+
classpathConfigurationProvider = new ClasspathConfigurationProvider(
projectPaths,
new DefaultTorqueGeneratorPaths());
Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ConfigurationTestSkipDecider.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ConfigurationTestSkipDecider.java?rev=993488&r1=993487&r2=993488&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ConfigurationTestSkipDecider.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ConfigurationTestSkipDecider.java Tue Sep 7 19:18:33 2010
@@ -1,5 +1,24 @@
package org.apache.torque.generator.configuration;
+/*
+ * 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.
+ */
+
import org.apache.torque.generator.control.ControllerState;
import org.apache.torque.generator.source.skipDecider.SkipDecider;
Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ConfigurationTestTransformer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ConfigurationTestTransformer.java?rev=993488&r1=993487&r2=993488&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ConfigurationTestTransformer.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ConfigurationTestTransformer.java Tue Sep 7 19:18:33 2010
@@ -1,5 +1,24 @@
package org.apache.torque.generator.configuration;
+/*
+ * 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.
+ */
+
import org.apache.torque.generator.control.ControllerState;
import org.apache.torque.generator.source.SourceElement;
import org.apache.torque.generator.source.transform.SourceTransformer;
@@ -7,7 +26,7 @@ import org.apache.torque.generator.sourc
/**
* A source transformer for testing the configuration class. Does nothing.
- *
+ *
* @version $Id: $
*/
public class ConfigurationTestTransformer implements SourceTransformer
@@ -21,7 +40,7 @@ public class ConfigurationTestTransforme
@Override
public int hashCode()
{
- // All instances of this class are equal to each other so always
+ // All instances of this class are equal to each other so always
// the same number is returned
return 1;
}
@@ -41,7 +60,7 @@ public class ConfigurationTestTransforme
{
return false;
}
- // All instances of this class are equal to each other
+ // All instances of this class are equal to each other
return true;
}
}
Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/OtherConfigurationTestSkipDecider.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/OtherConfigurationTestSkipDecider.java?rev=993488&r1=993487&r2=993488&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/OtherConfigurationTestSkipDecider.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/OtherConfigurationTestSkipDecider.java Tue Sep 7 19:18:33 2010
@@ -1,5 +1,24 @@
package org.apache.torque.generator.configuration;
+/*
+ * 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.
+ */
+
import org.apache.torque.generator.control.ControllerState;
import org.apache.torque.generator.source.skipDecider.SkipDecider;
Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/OtherConfigurationTestTransformer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/OtherConfigurationTestTransformer.java?rev=993488&r1=993487&r2=993488&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/OtherConfigurationTestTransformer.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/OtherConfigurationTestTransformer.java Tue Sep 7 19:18:33 2010
@@ -1,5 +1,24 @@
package org.apache.torque.generator.configuration;
+/*
+ * 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.
+ */
+
import org.apache.torque.generator.control.ControllerState;
import org.apache.torque.generator.source.SourceElement;
import org.apache.torque.generator.source.transform.SourceTransformer;
@@ -7,7 +26,7 @@ import org.apache.torque.generator.sourc
/**
* A source transformer for testing the configuration class. Does nothing.
- *
+ *
* @version $Id: $
*/
public class OtherConfigurationTestTransformer implements SourceTransformer
@@ -21,7 +40,7 @@ public class OtherConfigurationTestTrans
@Override
public int hashCode()
{
- // All instances of this class are equal to each other so always
+ // All instances of this class are equal to each other so always
// the same number is returned
return 1;
}
@@ -41,7 +60,7 @@ public class OtherConfigurationTestTrans
{
return false;
}
- // All instances of this class are equal to each other
+ // All instances of this class are equal to each other
return true;
}
}
Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java?rev=993488&r1=993487&r2=993488&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java Tue Sep 7 19:18:33 2010
@@ -77,7 +77,7 @@ import org.junit.Test;
public class ReadConfigurationTest extends BaseTest
{
private ControllerState controllerState;
-
+
@Before
public void setUp()
{
@@ -87,7 +87,7 @@ public class ReadConfigurationTest exten
Options options = new Options();
unitConfiguration.setOptions(options);
}
-
+
@Test
public void testReadConfiguration() throws Exception
{
@@ -146,11 +146,11 @@ public class ReadConfigurationTest exten
expectedOptions.addGlobalOptions(expectedOptionSet);
assertOptionsEquals(
expectedOptions,
- unitConfiguration.getOptions());
+ unitConfiguration.getOptions());
}
{
- EntityReferences entityReferences
+ EntityReferences entityReferences
= unitConfiguration.getEntityReferences();
Map<String, byte[]> actual = entityReferences.getEntityReferences();
assertEquals(2, actual.size());
@@ -163,7 +163,7 @@ public class ReadConfigurationTest exten
new File("src/test/configuration/src/main/torque-gen/resources/new.xsd")),
actual.get("http://db.apache.org/torque/new.xsd"));
}
-
+
{
List<Output> outputFiles = unitConfiguration.getOutputList();
assertEquals(3, outputFiles.size());
@@ -216,7 +216,7 @@ public class ReadConfigurationTest exten
(FileSourceProvider) output.getSourceProvider());
}
assertSourceProcessConfigurationEquals(
- new SourceProcessConfiguration(),
+ new SourceProcessConfiguration(),
output.getSourceProcessConfiguration());
}
@@ -285,21 +285,21 @@ public class ReadConfigurationTest exten
"properties/entry");
List<SourceTransformerDefinition> transformerDefinitions
= new ArrayList<SourceTransformerDefinition>();
-
+
transformerDefinitions.add(
new SourceTransformerDefinition(
- new ConfigurationTestTransformer(),
+ new ConfigurationTestTransformer(),
null));
transformerDefinitions.add(
new SourceTransformerDefinition(
- new OtherConfigurationTestTransformer(),
+ new OtherConfigurationTestTransformer(),
"database"));
sourceProcessConfiguration.setSourceTransformerDefinitions(
transformerDefinitions);
sourceProcessConfiguration.setSkipDecider(
"org.apache.torque.generator.configuration.ConfigurationTestSkipDecider");
assertSourceProcessConfigurationEquals(
- sourceProcessConfiguration,
+ sourceProcessConfiguration,
output.getSourceProcessConfiguration());
}
}
@@ -324,7 +324,7 @@ public class ReadConfigurationTest exten
assertFalse(output.isSkipIfExists());
{
- JdbcMetadataSourceProvider sourceProvider
+ JdbcMetadataSourceProvider sourceProvider
= new JdbcMetadataSourceProvider(
"jdbcUrl",
"jdbcDriver",
@@ -342,7 +342,7 @@ public class ReadConfigurationTest exten
(JdbcMetadataSourceProvider) output.getSourceProvider());
}
assertSourceProcessConfigurationEquals(
- new SourceProcessConfiguration(),
+ new SourceProcessConfiguration(),
output.getSourceProcessConfiguration());
}
}
@@ -381,7 +381,7 @@ public class ReadConfigurationTest exten
MergepointMapping mergepointMapping
= mergepointMappings.get("mergepointName");
assertEquals(1, mergepointMapping.getActions().size());
- MergepointAction action
+ MergepointAction action
= mergepointMapping.getActions().get(0);
assertEquals(
new ApplyAction(
@@ -607,11 +607,11 @@ public class ReadConfigurationTest exten
expectedOptions.addGlobalOptions(expectedOptionSet);
assertOptionsEquals(
expectedOptions,
- unitConfiguration.getOptions());
+ unitConfiguration.getOptions());
}
{
- EntityReferences entityReferences
+ EntityReferences entityReferences
= unitConfiguration.getEntityReferences();
Map<String, byte[]> actual = entityReferences.getEntityReferences();
assertEquals(3, actual.size());
@@ -673,7 +673,7 @@ public class ReadConfigurationTest exten
configurationHandlers,
controllerState);
sourceProvider.init(
- configurationHandlers,
+ configurationHandlers,
controllerState);
assertFileSourceProviderEquals(
sourceProvider,
@@ -685,17 +685,17 @@ public class ReadConfigurationTest exten
sourceProcessConfiguration.setStartElementsPath("parentSourceElement");
List<SourceTransformerDefinition> transformerDefinitions
= new ArrayList<SourceTransformerDefinition>();
-
+
transformerDefinitions.add(
new SourceTransformerDefinition(
- new OtherConfigurationTestTransformer(),
+ new OtherConfigurationTestTransformer(),
"parent/database"));
sourceProcessConfiguration.setSourceTransformerDefinitions(
transformerDefinitions);
sourceProcessConfiguration.setSkipDecider(
"org.apache.torque.generator.configuration.OtherConfigurationTestSkipDecider");
assertSourceProcessConfigurationEquals(
- sourceProcessConfiguration,
+ sourceProcessConfiguration,
output.getSourceProcessConfiguration());
}
}
@@ -747,7 +747,7 @@ public class ReadConfigurationTest exten
(FileSourceProvider) output.getSourceProvider());
}
assertSourceProcessConfigurationEquals(
- new SourceProcessConfiguration(),
+ new SourceProcessConfiguration(),
output.getSourceProcessConfiguration());
}
@@ -813,18 +813,18 @@ public class ReadConfigurationTest exten
= new ArrayList<SourceTransformerDefinition>();
transformerDefinitions.add(
new SourceTransformerDefinition(
- new ConfigurationTestTransformer(),
+ new ConfigurationTestTransformer(),
null));
transformerDefinitions.add(
new SourceTransformerDefinition(
- new OtherConfigurationTestTransformer(),
+ new OtherConfigurationTestTransformer(),
"database"));
sourceProcessConfiguration.setSourceTransformerDefinitions(
transformerDefinitions);
sourceProcessConfiguration.setSkipDecider(
"org.apache.torque.generator.configuration.ConfigurationTestSkipDecider");
assertSourceProcessConfigurationEquals(
- sourceProcessConfiguration,
+ sourceProcessConfiguration,
output.getSourceProcessConfiguration());
}
}
@@ -846,7 +846,7 @@ public class ReadConfigurationTest exten
assertEquals("outputFileName", output.getFilename());
assertNull(output.getFilenameOutlet());
{
- JdbcMetadataSourceProvider sourceProvider
+ JdbcMetadataSourceProvider sourceProvider
= new JdbcMetadataSourceProvider(
"jdbcUrl",
"jdbcDriver",
@@ -864,7 +864,7 @@ public class ReadConfigurationTest exten
(JdbcMetadataSourceProvider) output.getSourceProvider());
}
assertSourceProcessConfigurationEquals(
- new SourceProcessConfiguration(),
+ new SourceProcessConfiguration(),
output.getSourceProcessConfiguration());
}
}
@@ -885,10 +885,10 @@ public class ReadConfigurationTest exten
= outlet.getMergepointMappings();
assertEquals(3, mergepointMappings.size());
{
- MergepointMapping mergepointMapping
+ MergepointMapping mergepointMapping
= mergepointMappings.get("properties");
assertEquals(1, mergepointMapping.getActions().size());
- MergepointAction action
+ MergepointAction action
= mergepointMapping.getActions().get(0);
assertEquals(
new TraverseAllAction(
@@ -896,14 +896,14 @@ public class ReadConfigurationTest exten
"org.apache.torque.generator.velocity.propertyCopy",
true),
action);
- assertEquals("inputElement", outlet.getInputElementName());
+ assertEquals("inputElement", outlet.getInputElementName());
}
{
// mergepoint from the separate mapping in child
- MergepointMapping mergepointMapping
+ MergepointMapping mergepointMapping
= mergepointMappings.get("mergepointName");
assertEquals(1, mergepointMapping.getActions().size());
- MergepointAction action
+ MergepointAction action
= mergepointMapping.getActions().get(0);
assertEquals(
new ApplyAction(
@@ -915,10 +915,10 @@ public class ReadConfigurationTest exten
}
{
// other mergepoint from the separate mapping in child
- MergepointMapping mergepointMapping
+ MergepointMapping mergepointMapping
= mergepointMappings.get("mergepointFromParent");
assertEquals(1, mergepointMapping.getActions().size());
- MergepointAction action
+ MergepointAction action
= mergepointMapping.getActions().get(0);
assertEquals(
new ApplyAction(
@@ -983,7 +983,7 @@ public class ReadConfigurationTest exten
expected.getPaths(),
actual.getPaths());
}
-
+
private static void assertJdbcMetadataSourceProviderEquals(
JdbcMetadataSourceProvider expected,
JdbcMetadataSourceProvider actual)
@@ -1019,12 +1019,12 @@ public class ReadConfigurationTest exten
expected.getUsername(),
actual.getUsername());
}
-
+
private static void assertOptionsEquals(Options expected, Options actual)
{
- Map<QualifiedName, Option> expectedMap
+ Map<QualifiedName, Option> expectedMap
= expected.getGlobalScope();
- Map<QualifiedName, Option> actualMap
+ Map<QualifiedName, Option> actualMap
= actual.getGlobalScope();
assertEquals(expectedMap.size(), actualMap.size());
@@ -1036,7 +1036,7 @@ public class ReadConfigurationTest exten
assertEquals(expectedValue, actualValue);
}
}
-
+
private void assertSourceProcessConfigurationEquals(
SourceProcessConfiguration expected,
SourceProcessConfiguration actual)
@@ -1058,12 +1058,12 @@ public class ReadConfigurationTest exten
expected.getTransformerDefinitions(),
actual.getTransformerDefinitions());
}
-
+
/**
* Creates as set containing the Strings in content.
- *
+ *
* @param content The Strings which should be in the set.
- *
+ *
* @return the Set containing all the strings.
*/
private static Set<String> createSetFrom(String... content)
Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationTest.java?rev=993488&r1=993487&r2=993488&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationTest.java Tue Sep 7 19:18:33 2010
@@ -37,11 +37,11 @@ import org.junit.Test;
public class OutletConfigurationTest
{
private OutletConfiguration outletConfiguration;
-
-
+
+
/**
* Tests that getOutlets returns the correct result.
- *
+ *
* @throws ConfigurationException if an error occurs.
*/
@Test
@@ -52,32 +52,32 @@ public class OutletConfigurationTest
new QualifiedName("test.outlet.0")));
outlets.add(new PackageToPathOutlet(
new QualifiedName("test.outlet.1")));
- List<MergepointMapping> mergepointMappings
+ List<MergepointMapping> mergepointMappings
= new ArrayList<MergepointMapping>();
-
+
OutletConfiguration outletConfiguration
= new OutletConfiguration(outlets, mergepointMappings);
outletConfiguration.resolveMergepointMappings();
-
+
assertEquals(2, outletConfiguration.getOutlets().size());
assertEquals(
- outlets.get(0),
+ outlets.get(0),
outletConfiguration.getOutlets().get(
new QualifiedName("test.outlet.0")));
assertEquals(
- outlets.get(1),
+ outlets.get(1),
outletConfiguration.getOutlets().get(
new QualifiedName("test.outlet.1")));
}
/**
* Tests that one cannot add a outlet with the same name twice
- *
+ *
* @throws ConfigurationException if OutletConfiguration cannot be
* created,
*/
@Test(expected = ConfigurationException.class)
- public void testConstructorWithSameOutletName()
+ public void testConstructorWithSameOutletName()
throws ConfigurationException
{
List<Outlet> outlets = new ArrayList<Outlet>();
@@ -85,7 +85,7 @@ public class OutletConfigurationTest
new QualifiedName("sameName")));
outlets.add(new PackageToPathOutlet(
new QualifiedName("sameName")));
- List<MergepointMapping> mergepointMappings
+ List<MergepointMapping> mergepointMappings
= new ArrayList<MergepointMapping>();
new OutletConfiguration(outlets, mergepointMappings);
@@ -103,28 +103,28 @@ public class OutletConfigurationTest
new QualifiedName("test.outlet")));
outlets.add(new PackageToPathOutlet(
new QualifiedName("test.outlet.2")));
- List<MergepointMapping> mergepointMappings
+ List<MergepointMapping> mergepointMappings
= new ArrayList<MergepointMapping>();
mergepointMappings.add(
new MergepointMapping("test.outlet.testMergepoint"));
mergepointMappings.get(0).addAction(
new ApplyAction(".", "test.outlet.2", false));
-
+
OutletConfiguration outletConfiguration
= new OutletConfiguration(outlets, mergepointMappings);
outletConfiguration.resolveMergepointMappings();
-
+
Outlet outlet = outletConfiguration.getOutlet(
new QualifiedName("test.outlet"));
assertEquals(1, outlet.getMergepointMappings().size());
assertEquals(
- 1,
+ 1,
outlet.getMergepointMapping("testMergepoint")
.getActions().size());
}
/**
- * Checks that resolveMergepointMappings throws an error if the
+ * Checks that resolveMergepointMappings throws an error if the
* outlet name cannot be resolved.
*/
@Test(expected = ConfigurationException.class)
@@ -134,18 +134,18 @@ public class OutletConfigurationTest
List<Outlet> outlets = new ArrayList<Outlet>();
outlets.add(new JavaOutlet(
new QualifiedName("test.outlet")));
- List<MergepointMapping> mergepointMappings
+ List<MergepointMapping> mergepointMappings
= new ArrayList<MergepointMapping>();
mergepointMappings.add(
new MergepointMapping("not.existing.outlet.testMergepoint"));
-
+
OutletConfiguration outletConfiguration
= new OutletConfiguration(outlets, mergepointMappings);
outletConfiguration.resolveMergepointMappings();
}
/**
- * Checks that resolveMergepointMappings throws an error if a
+ * Checks that resolveMergepointMappings throws an error if a
* mergepoint does not contain a namespace.
*/
@Test(expected = ConfigurationException.class)
@@ -155,11 +155,11 @@ public class OutletConfigurationTest
List<Outlet> outlets = new ArrayList<Outlet>();
outlets.add(new JavaOutlet(
new QualifiedName("test.outlet")));
- List<MergepointMapping> mergepointMappings
+ List<MergepointMapping> mergepointMappings
= new ArrayList<MergepointMapping>();
mergepointMappings.add(
new MergepointMapping("testMergepoint"));
-
+
OutletConfiguration outletConfiguration
= new OutletConfiguration(outlets, mergepointMappings);
outletConfiguration.resolveMergepointMappings();
Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/file/FileTestUtils.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/file/FileTestUtils.java?rev=993488&r1=993487&r2=993488&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/file/FileTestUtils.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/file/FileTestUtils.java Tue Sep 7 19:18:33 2010
@@ -1,5 +1,24 @@
package org.apache.torque.generator.file;
+/*
+ * 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.
+ */
+
import static org.junit.Assert.assertEquals;
import java.io.File;
@@ -11,12 +30,12 @@ import java.util.Set;
public class FileTestUtils
{
/**
- * Checks that the file list of the Fileset contains all the
- * expected paths and no other paths.
- *
+ * Checks that the file list of the Fileset contains all the
+ * expected paths and no other paths.
+ *
* @param fileset The Fileset which file list should be checked.
* @param expectedPaths the paths which should be in the fileset.
- *
+ *
* @throws IOException if Fileset#getFiles() throws it.
*/
public static void assertFileListEquals(
@@ -29,9 +48,9 @@ public class FileTestUtils
}
/**
- * Checks that a file list contains all the
- * expected paths and no other paths.
- *
+ * Checks that a file list contains all the
+ * expected paths and no other paths.
+ *
* @param fileList The list of files which should be checked.
* @param expectedPaths the paths which should be in the file list.
*/
@@ -54,9 +73,9 @@ public class FileTestUtils
/**
* Creates as set containing the Strings in content.
- *
+ *
* @param content The Strings which should be in the set.
- *
+ *
* @return the Set containing all the strings.
*/
public static Set<String> createSetFrom(String... content)
Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/file/FilesetTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/file/FilesetTest.java?rev=993488&r1=993487&r2=993488&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/file/FilesetTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/file/FilesetTest.java Tue Sep 7 19:18:33 2010
@@ -34,7 +34,7 @@ import org.junit.Test;
/**
* Tests for the class Fileset.
- *
+ *
* @version $Id: $
*/
public class FilesetTest
@@ -47,7 +47,7 @@ public class FilesetTest
String path = "/tmp/schema.xml";
int baseDirSeparatorPos = Fileset.getWildcardFreeSeparatorPos(path);
assertEquals(4, baseDirSeparatorPos);
- String wildcardFree
+ String wildcardFree
= Fileset.getPathPartBefore(path, baseDirSeparatorPos);
assertEquals("/tmp", wildcardFree);
String wildcardPattern
@@ -61,7 +61,7 @@ public class FilesetTest
String path = "schema.xml";
int baseDirSeparatorPos = Fileset.getWildcardFreeSeparatorPos(path);
assertEquals(-1, baseDirSeparatorPos);
- String wildcardFree
+ String wildcardFree
= Fileset.getPathPartBefore(path, baseDirSeparatorPos);
assertEquals(".", wildcardFree);
String wildcardPattern
@@ -75,7 +75,7 @@ public class FilesetTest
String path = "C:\\schema\\?\\schema.xml";
int baseDirSeparatorPos = Fileset.getWildcardFreeSeparatorPos(path);
assertEquals(9, baseDirSeparatorPos);
- String wildcardFree
+ String wildcardFree
= Fileset.getPathPartBefore(path, baseDirSeparatorPos);
assertEquals("C:\\schema", wildcardFree);
String wildcardPattern
@@ -117,7 +117,7 @@ public class FilesetTest
String path = "*/???/schema.xml";
int baseDirSeparatorPos = Fileset.getWildcardFreeSeparatorPos(path);
assertEquals(-1, baseDirSeparatorPos);
- String wildcardFree
+ String wildcardFree
= Fileset.getPathPartBefore(path, baseDirSeparatorPos);
assertEquals(".", wildcardFree);
String wildcardPattern
@@ -221,7 +221,7 @@ public class FilesetTest
fileset,
new File(TEST_BASE_DIR, "subfolder/../1.properties"));
}
-
+
@Test
public void testFilelistAllNull() throws IOException
{
@@ -359,7 +359,7 @@ public class FilesetTest
new File(TEST_BASE_DIR, "./package.html"),
new File(TEST_BASE_DIR, "./1.properties"));
}
-
+
@Test
public void testFilelistExcludeDoubleDotLeavingBaseDir() throws IOException
{
@@ -371,7 +371,7 @@ public class FilesetTest
fileset,
new File(TEST_BASE_DIR, "subfolder/../11.properties"));
}
-
+
@Test
public void testFilelistBasedirNul() throws IOException
{
Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/JavadocOutletTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/JavadocOutletTest.java?rev=993488&r1=993487&r2=993488&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/JavadocOutletTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/JavadocOutletTest.java Tue Sep 7 19:18:33 2010
@@ -35,7 +35,7 @@ import org.junit.Test;
public class JavadocOutletTest
{
private JavadocOutlet javadocOutlet;
-
+
@Before
public void setUp()
{
@@ -44,7 +44,7 @@ public class JavadocOutletTest
}
/**
- * Tests that the javadoc contains both the body and the attributes
+ * Tests that the javadoc contains both the body and the attributes
* and both are properly line wrapped.
*/
@Test
@@ -81,7 +81,7 @@ public class JavadocOutletTest
/**
* Checks that a break-after character can cause a line break , and that
* a single space after such a break is removed. The boundary cases
- * maxLineLength + 1 and maxLineLength are checked.
+ * maxLineLength + 1 and maxLineLength are checked.
*/
@Test
public void testWrapAfterNotRemovedCharacters()
@@ -96,9 +96,9 @@ public class JavadocOutletTest
+ " * characters\n",
result);
}
-
+
/**
- * Checks that a space can cause a line break and the space is removed
+ * Checks that a space can cause a line break and the space is removed
* in the output. The boundary cases maxLineLength + 1 and maxLineLength
* are checked.
*/
@@ -115,7 +115,7 @@ public class JavadocOutletTest
}
/**
- * Checks that a new javadoc attribute causes a double line wrap
+ * Checks that a new javadoc attribute causes a double line wrap
*/
@Test
public void testDoubleWrapAtNewAttribute()
@@ -147,7 +147,7 @@ public class JavadocOutletTest
}
/**
- * Checks that between different javadoc attributes
+ * Checks that between different javadoc attributes
* where the first ends with a line break,
* a double line wrap is inserted.
*/
@@ -165,7 +165,7 @@ public class JavadocOutletTest
/**
* Checks that a preceding \n or two same javadoc attribute
- * cause a single line wrap
+ * cause a single line wrap
*/
@Test
public void testSingleWrapAtAttribute()
@@ -183,7 +183,7 @@ public class JavadocOutletTest
/**
* Checks that a preceding \n or two same javadoc attribute
- * cause a single line wrap
+ * cause a single line wrap
*/
@Test
public void testSingleWrapAtAttributeWithLineBreak()
@@ -283,7 +283,7 @@ public class JavadocOutletTest
JavadocOutlet.removeEnd(builder, " \r\n");
assertEquals(" \r\r\n \na", builder.toString());
}
-
+
/**
* Tests that removeEnd works if a part is removed.
*/
Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/XmlOutletTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/XmlOutletTest.java?rev=993488&r1=993487&r2=993488&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/XmlOutletTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/XmlOutletTest.java Tue Sep 7 19:18:33 2010
@@ -1,5 +1,24 @@
package org.apache.torque.generator.outlet.java;
+/*
+ * 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.
+ */
+
import static org.junit.Assert.assertEquals;
import org.apache.torque.generator.control.ControllerState;
Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/RichSourceElementImplTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/RichSourceElementImplTest.java?rev=993488&r1=993487&r2=993488&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/RichSourceElementImplTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/RichSourceElementImplTest.java Tue Sep 7 19:18:33 2010
@@ -121,13 +121,13 @@ public class RichSourceElementImplTest
@Test
public void testRemoveChildViaIterator()
{
- Iterator<SourceElement> childIt
+ Iterator<SourceElement> childIt
= rootSourceElement.getChildren().iterator();
List<SourceElement> children = rootSourceElement.getChildren();
SourceElement child1 = children.get(0);
SourceElement child2 = children.get(1);
SourceElement child3 = children.get(2);
- childIt.next(); //child1
+ childIt.next(); //child1
childIt.next(); //child2
childIt.remove();
@@ -299,7 +299,7 @@ public class RichSourceElementImplTest
+ " must be equal(2)");
}
}
-
+
@Test
public void testSetAttribute()
{
Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSourceTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSourceTest.java?rev=993488&r1=993487&r2=993488&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSourceTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSourceTest.java Tue Sep 7 19:18:33 2010
@@ -42,9 +42,9 @@ import org.junit.Test;
public class JdbcMetadataSourceTest
{
- private static Logger logger
+ private static Logger logger
= Logger.getLogger(JdbcMetadataSourceTest.class);
-
+
private static String SQL_FILENAME = "jdbcMetadataSourceTest.sql";
private static String SQL_CHARSET = "iso-8859-1";
@@ -111,7 +111,7 @@ public class JdbcMetadataSourceTest
Object tableName = tableElement.getAttribute("name");
if ("AUTHOR".equals(tableName))
{
- List<SourceElement> columnElements
+ List<SourceElement> columnElements
= tableElement.getChildren();
assertEquals(2, columnElements.size());
for (SourceElement columnElement : columnElements)
Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/properties/PropertiesParserTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/properties/PropertiesParserTest.java?rev=993488&r1=993487&r2=993488&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/properties/PropertiesParserTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/properties/PropertiesParserTest.java Tue Sep 7 19:18:33 2010
@@ -36,7 +36,7 @@ import org.junit.Test;
public class PropertiesParserTest
{
private ControllerState controllerState = new ControllerState();
-
+
public PropertiesParserTest()
{
UnitConfiguration unitConfiguration = new UnitConfiguration();
Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/FileSourceProviderTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/FileSourceProviderTest.java?rev=993488&r1=993487&r2=993488&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/FileSourceProviderTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/FileSourceProviderTest.java Tue Sep 7 19:18:33 2010
@@ -1,5 +1,24 @@
package org.apache.torque.generator.source.stream;
+/*
+ * 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.
+ */
+
import static org.apache.torque.generator.file.FileTestUtils.createSetFrom;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -22,19 +41,19 @@ public class FileSourceProviderTest
private static File TEST_BASE_DIR = new File("src/test/file");
@Test
- public void testReadFiles()
+ public void testReadFiles()
throws ConfigurationException, SourceException
{
Fileset fileset = new Fileset(
TEST_BASE_DIR,
createSetFrom("*.properties"),
null);
- FileSourceProvider fileSourceProvider
+ FileSourceProvider fileSourceProvider
= new FileSourceProvider(null, fileset);
fileSourceProvider.init(
new ConfigurationHandlers(),
new ControllerState());
-
+
// We read all sources and add the first property key to a hash set.
// As all the source files only have one key equal to the base filename
// we can make sure we have read the expected files correctly.
@@ -59,16 +78,16 @@ public class FileSourceProviderTest
expectedKeys.add("11");
assertEquals(expectedKeys, resultKeys);
}
-
+
@Test(expected = ConfigurationException.class)
- public void testReadFilesBasedirNull()
+ public void testReadFilesBasedirNull()
throws ConfigurationException, SourceException
{
Fileset fileset = new Fileset(
null,
createSetFrom("*.properties"),
null);
- FileSourceProvider fileSourceProvider
+ FileSourceProvider fileSourceProvider
= new FileSourceProvider(null, fileset);
fileSourceProvider.init(
new ConfigurationHandlers(),
Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/SourceToXmlTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/SourceToXmlTest.java?rev=993488&r1=993487&r2=993488&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/SourceToXmlTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/SourceToXmlTest.java Tue Sep 7 19:18:33 2010
@@ -42,7 +42,7 @@ import org.junit.Test;
public class SourceToXmlTest
{
private ControllerState controllerState = new ControllerState();
-
+
public SourceToXmlTest()
{
UnitConfiguration unitConfiguration = new UnitConfiguration();
Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/XmlParserTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/XmlParserTest.java?rev=993488&r1=993487&r2=993488&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/XmlParserTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/stream/XmlParserTest.java Tue Sep 7 19:18:33 2010
@@ -35,7 +35,7 @@ import org.junit.Test;
public class XmlParserTest
{
private ControllerState controllerState = new ControllerState();
-
+
public XmlParserTest()
{
UnitConfiguration unitConfiguration = new UnitConfiguration();
@@ -113,7 +113,7 @@ public class XmlParserTest
" text For Second Level Element 4 ",
child4.getAttribute((String) null));
}
-
+
@Test
public void testReadXmlSourceWithSchema() throws Exception
{
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org