From 89d533781666e75be5580fa4bbee29efc48bf34b Mon Sep 17 00:00:00 2001 From: Emmanuel Venisse Date: Mon, 27 Jun 2005 13:50:07 +0000 Subject: [PATCH] [MNG-520]. copy artifactId when we clone a model. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@201990 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/project/MavenProjectTest.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 maven-project/src/test/java/org/apache/maven/project/MavenProjectTest.java diff --git a/maven-project/src/test/java/org/apache/maven/project/MavenProjectTest.java b/maven-project/src/test/java/org/apache/maven/project/MavenProjectTest.java new file mode 100644 index 0000000000..6a5f31458d --- /dev/null +++ b/maven-project/src/test/java/org/apache/maven/project/MavenProjectTest.java @@ -0,0 +1,32 @@ +package org.apache.maven.project; + +/* + * Copyright 2005 The Apache Software Foundation. + * + * Licensed 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 java.io.File; + +public class MavenProjectTest + extends MavenProjectTestCase +{ + public void testCopyConstructor() throws Exception + { + File f = getFileForClasspathResource( "canonical-pom.xml" ); + MavenProject projectToClone = getProject(f); + + MavenProject clonedProject = new MavenProject(projectToClone); + assertEquals("maven-core", clonedProject.getArtifactId()); + } +}