From: Joakim Erdfelt Date: Tue, 25 Sep 2007 18:03:15 +0000 (+0000) Subject: Adding unit tests for dot notation artifactIds. (odd, but valid) X-Git-Tag: archiva-1.0-beta-3~151 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6b825688e09008a095e5bfd84580fdb0f6ea674f;p=archiva.git Adding unit tests for dot notation artifactIds. (odd, but valid) git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@579333 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/layout/DefaultBidirectionalRepositoryLayoutTest.java b/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/layout/DefaultBidirectionalRepositoryLayoutTest.java index 1d34e42db..ace646dd8 100644 --- a/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/layout/DefaultBidirectionalRepositoryLayoutTest.java +++ b/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/layout/DefaultBidirectionalRepositoryLayoutTest.java @@ -146,7 +146,39 @@ public class DefaultBidirectionalRepositoryLayoutTest assertLayout( path, groupId, artifactId, version, classifier, type ); } + + /** + * It may seem odd, but this is a valid artifact. + */ + public void testGoodDotNotationArtifactId() + throws LayoutException + { + String groupId = "com.company.department"; + String artifactId = "com.company.department"; + String version = "0.2"; + String classifier = null; + String type = "pom"; + String path = "com/company/department/com.company.department/0.2/com.company.department-0.2.pom"; + + assertLayout( path, groupId, artifactId, version, classifier, type ); + } + /** + * It may seem odd, but this is a valid artifact. + */ + public void testGoodDotNotationSameGroupIdAndArtifactId() + throws LayoutException + { + String groupId = "com.company.department"; + String artifactId = "com.company.department.project"; + String version = "0.3"; + String classifier = null; + String type = "pom"; + String path = "com/company/department/com.company.department.project/0.3/com.company.department.project-0.3.pom"; + + assertLayout( path, groupId, artifactId, version, classifier, type ); + } + public void testGoodComFooTool() throws LayoutException {