1 package org.apache.archiva.repository.maven.content;
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
21 import org.apache.archiva.model.ArtifactReference;
22 import org.apache.archiva.repository.LayoutException;
23 import org.apache.archiva.repository.ManagedRepositoryContent;
24 import org.apache.archiva.repository.RemoteRepository;
25 import org.apache.archiva.repository.RemoteRepositoryContent;
26 import org.apache.archiva.repository.content.ItemSelector;
27 import org.apache.archiva.repository.maven.content.AbstractDefaultRepositoryContentTestCase;
28 import org.apache.archiva.repository.maven.content.RemoteDefaultRepositoryContent;
29 import org.apache.archiva.repository.maven.metadata.storage.ArtifactMappingProvider;
30 import org.junit.Before;
32 import javax.inject.Inject;
33 import java.util.List;
36 * RemoteDefaultRepositoryContentTest
38 public class RemoteDefaultRepositoryContentTest
39 extends AbstractDefaultRepositoryContentTestCase
43 private List<? extends ArtifactMappingProvider> artifactMappingProviders;
45 private RemoteRepositoryContent repoContent;
51 RemoteRepository repository =
52 createRemoteRepository( "testRemoteRepo", "Unit Test Remote Repo", "http://repo1.maven.org/maven2/" );
54 repoContent = new RemoteDefaultRepositoryContent(artifactMappingProviders);
55 //repoContent = (RemoteRepositoryContent) lookup( RemoteRepositoryContent.class, "default" );
56 repoContent.setRepository( repository );
60 protected ArtifactReference toArtifactReference( String path )
61 throws LayoutException
63 return repoContent.toArtifactReference( path );
67 protected ItemSelector toItemSelector( String path ) throws LayoutException
69 return repoContent.toItemSelector( path );
73 protected ManagedRepositoryContent getManaged( )
79 protected String toPath( ArtifactReference reference )
81 return repoContent.toPath( reference );
85 protected String toPath( ItemSelector selector ) {
86 return repoContent.toPath( selector );