SEPARATOR). A qualified name is in the scope of its own namespace and all children namespaces of its own namespace (i.e. the namespaces "deeper down" the hierarchy). For example, the namespace org.apache.torque is in the scope of org.apache but not in the scope of org.apache.torque.generator. As a special case, if the namespace is the empty String, the name is valid in all namespaces. The namespace and the name are also separated by a dot (SEPARATOR). Instances of this class are immutable. To prevent mutable subclasses, this class is final.
public void testConstructorWithSameOutletName()
throws ConfigurationException
{
List<Outlet> outlets = new ArrayList<Outlet>();
outlets.add(new JavaOutlet(
new QualifiedName("sameName")));
outlets.add(new PackageToPathOutlet(
new QualifiedName("sameName")));
List<MergepointMapping> mergepointMappings
= new ArrayList<MergepointMapping>();
new OutletConfiguration(outlets, mergepointMappings, unitDescriptor);
}
@Test
public void testResolveMergepointMappings() throws ConfigurationException
{
List<Outlet> outlets = new ArrayList<Outlet>();
outlets.add(new JavaOutlet(
new QualifiedName("test.outlet")));
outlets.add(new PackageToPathOutlet(
new QualifiedName("test.outlet.2")));
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,
unitDescriptor);
outletConfiguration.resolveMergepointMappings();
Outlet outlet = outletConfiguration.getOutlet(
new QualifiedName("test.outlet"));
assertEquals(1, outlet.getMergepointMappings().size());
assertEquals(
1,
outlet.getMergepointMapping("testMergepoint")
.getActions().size());
public void testResolveMergepointMappingsNotExistingOutlet()
throws ConfigurationException
{
List<Outlet> outlets = new ArrayList<Outlet>();
outlets.add(new JavaOutlet(
new QualifiedName("test.outlet")));
List<MergepointMapping> mergepointMappings
= new ArrayList<MergepointMapping>();
mergepointMappings.add(
new MergepointMapping("not.existing.outlet.testMergepoint"));
public void testResolveMergepointMappingsNoNamespace()
throws ConfigurationException
{
List<Outlet> outlets = new ArrayList<Outlet>();
outlets.add(new JavaOutlet(
new QualifiedName("test.outlet")));
List<MergepointMapping> mergepointMappings
= new ArrayList<MergepointMapping>();
mergepointMappings.add(
new MergepointMapping("testMergepoint"));
+ OUTLET_NAME_ATTRIBUTE
+ " must be set on the element "
+ rawName
+ " for Groovy Outlets");
}
outletName = new QualifiedName(nameAttribute);
}
String path = attributes.getValue(OUTLET_PATH_ATTRIBUTE);
try
Related Classes of org.apache.torque.generator.qname.QualifiedName
Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.