1 package org.apache.maven.archiva.configuration;
\r
4 * Licensed to the Apache Software Foundation (ASF) under one
\r
5 * or more contributor license agreements. See the NOTICE file
\r
6 * distributed with this work for additional information
\r
7 * regarding copyright ownership. The ASF licenses this file
\r
8 * to you under the Apache License, Version 2.0 (the
\r
9 * "License"); you may not use this file except in compliance
\r
10 * with the License. You may obtain a copy of the License at
\r
12 * http://www.apache.org/licenses/LICENSE-2.0
\r
14 * Unless required by applicable law or agreed to in writing,
\r
15 * software distributed under the License is distributed on an
\r
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
\r
17 * KIND, either express or implied. See the License for the
\r
18 * specific language governing permissions and limitations
\r
19 * under the License.
\r
22 import junit.framework.TestCase;
\r
25 * Test the generated LegacyArtifactPath class from Modello. This is primarily to test the hand coded methods.
\r
28 public class LegacyArtifactPathTest
\r
32 private LegacyArtifactPath legacyArtifactPath = new LegacyArtifactPath();
\r
34 public void testLegacyArtifactPathWithClassifierResolution()
\r
36 legacyArtifactPath.setArtifact( "groupId:artifactId:version:classifier:type" );
\r
38 assertEquals( "groupId", legacyArtifactPath.getGroupId() );
\r
39 assertEquals( "artifactId", legacyArtifactPath.getArtifactId() );
\r
40 assertEquals( "version", legacyArtifactPath.getVersion() );
\r
41 assertEquals( "classifier", legacyArtifactPath.getClassifier() );
\r
42 assertEquals( "type", legacyArtifactPath.getType() );
\r
46 public void testLegacyArtifactPathWithoutClassifierResolution()
\r
48 legacyArtifactPath.setArtifact( "groupId:artifactId:version::type" );
\r
50 assertEquals( "groupId", legacyArtifactPath.getGroupId() );
\r
51 assertEquals( "artifactId", legacyArtifactPath.getArtifactId() );
\r
52 assertEquals( "version", legacyArtifactPath.getVersion() );
\r
53 assertNull( legacyArtifactPath.getClassifier() );
\r
54 assertEquals( "type", legacyArtifactPath.getType() );
\r