FileDocCategorySizeDatePackage
ProjectComponentTest.javaAPI DocApache Ant 1.701792Wed Dec 13 06:16:28 GMT 2006org.apache.tools.ant

ProjectComponentTest

public class ProjectComponentTest extends TestCase

Fields Summary
Constructors Summary
public ProjectComponentTest(String name)

        super(name);
    
Methods Summary
public voidtestClone()

        Project expectedProject = new Project();
        Location expectedLocation = new Location("foo");
        String expectedDescription = "bar";

        // use an anonymous subclass since ProjectComponent is abstract
        ProjectComponent pc = new ProjectComponent() {
            };
        pc.setProject(expectedProject);
        pc.setLocation(expectedLocation);
        pc.setDescription(expectedDescription);

        ProjectComponent cloned = (ProjectComponent) pc.clone();
        assertNotSame(pc, cloned);
        assertSame(cloned.getProject(), expectedProject);
        assertSame(cloned.getLocation(), expectedLocation);
        assertSame(cloned.getDescription(), expectedDescription);