@@ -0,0 +1,2904 @@
+/*-%0A * Copyright (c) 2012-2013 Red Hat, Inc.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.fedoraproject.maven.repository;%0A%0Aimport org.codehaus.plexus.PlexusTestCase;%0Aimport org.fedoraproject.maven.model.Artifact;%0A%0A/**%0A * @author Mikolaj Izdebski%0A */%0Apublic class LayoutTest%0A    extends PlexusTestCase%0A%7B%0A    /**%0A     * Test layout objects.%0A     * %0A     * @throws Exception%0A     */%0A    public void testLayouts()%0A        throws Exception%0A    %7B%0A        assertTrue( Layout.MAVEN.isVersioned() );%0A        assertTrue( Layout.JPP.isVersioned() );%0A        assertTrue( Layout.FLAT.isVersioned() );%0A        assertFalse( Layout.JPP_VERSIONLESS.isVersioned() );%0A        assertFalse( Layout.FLAT_VERSIONLESS.isVersioned() );%0A%0A        Artifact artifact = new Artifact( %22an-example.artifact%22, %22used-FOR42.testing%22, %22blah-1.2.3-foo%22, %22ext-ens.ion%22 );%0A%0A        assertEquals( %22an-example/artifact/used-FOR42.testing/blah-1.2.3-foo/used-FOR42.testing-blah-1.2.3-foo.ext-ens.ion%22,%0A                      Layout.MAVEN.getArtifactPath( artifact ) );%0A        assertEquals( %22an-example/artifact/used-FOR42.testing-blah-1.2.3-foo.ext-ens.ion%22,%0A                      Layout.JPP.getArtifactPath( artifact ) );%0A        assertEquals( %22an-example/artifact/used-FOR42.testing.ext-ens.ion%22,%0A                      Layout.JPP_VERSIONLESS.getArtifactPath( artifact ) );%0A        assertEquals( %22an-example.artifact-used-FOR42.testing-blah-1.2.3-foo.ext-ens.ion%22,%0A                      Layout.FLAT.getArtifactPath( artifact ) );%0A        assertEquals( %22an-example.artifact-used-FOR42.testing.ext-ens.ion%22,%0A                      Layout.FLAT_VERSIONLESS.getArtifactPath( artifact ) );%0A    %7D%0A%0A    /**%0A     * Test is JPP prefixes in groupId are handled correctly.%0A     * %0A     * @throws Exception%0A     */%0A    public void testJppPrefixes()%0A        throws Exception%0A    %7B%0A        Artifact artifact1 = new Artifact( %22JPP%22, %22testing%22, %221.2.3%22, %22abc%22 );%0A        Artifact artifact2 = new Artifact( %22JPP/group%22, %22testing%22, %221.2.3%22, %22abc%22 );%0A        Artifact artifact3 = new Artifact( %22JPP-group%22, %22testing%22, %221.2.3%22, %22abc%22 );%0A%0A        assertEquals( %22testing.abc%22, Layout.JPP_VERSIONLESS.getArtifactPath( artifact1 ) );%0A        assertEquals( %22group/testing.abc%22, Layout.JPP_VERSIONLESS.getArtifactPath( artifact2 ) );%0A        assertEquals( %22JPP-group/testing.abc%22, Layout.JPP_VERSIONLESS.getArtifactPath( artifact3 ) );%0A    %7D%0A%7D%0A

Implement LayoutTest