* under the License.
*/
-import org.apache.archiva.admin.model.beans.ManagedRepository;
import org.apache.archiva.checksum.ChecksumAlgorithm;
import org.apache.archiva.checksum.ChecksummedFile;
import org.apache.archiva.configuration.ArchivaConfiguration;
import org.apache.archiva.metadata.repository.storage.RepositoryPathTranslator;
import org.apache.archiva.redback.components.registry.Registry;
import org.apache.archiva.redback.components.registry.RegistryListener;
+import org.apache.archiva.repository.ManagedRepository;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
*/
import junit.framework.TestCase;
-import org.apache.archiva.admin.model.beans.ManagedRepository;
import org.apache.archiva.consumers.ConsumerException;
import org.apache.archiva.metadata.model.ArtifactMetadata;
import org.apache.archiva.metadata.model.MetadataFacet;
import org.apache.archiva.metadata.repository.RepositorySessionFactory;
import org.apache.archiva.metadata.repository.storage.RepositoryPathTranslator;
import org.apache.archiva.metadata.model.facets.RepositoryProblemFacet;
+import org.apache.archiva.repository.BasicManagedRepository;
+import org.apache.archiva.repository.ManagedRepository;
import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
import org.junit.Before;
import org.junit.Test;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Date;
+import java.util.Locale;
import static org.mockito.Mockito.*;
@Named( value = "knownRepositoryContentConsumer#duplicate-artifacts" )
private DuplicateArtifactsConsumer consumer;
- private ManagedRepository config;
+ private BasicManagedRepository config;
private MetadataRepository metadataRepository;
assertNotNull( consumer );
- config = new ManagedRepository();
- config.setId( TEST_REPO );
- config.setLocation( Paths.get( "target/test-repository" ).toAbsolutePath().toString() );
+ config = new BasicManagedRepository(TEST_REPO, TEST_REPO);
+ config.setLocation( Paths.get( "target/test-repository" ).toAbsolutePath().toUri() );
metadataRepository = mock( MetadataRepository.class );
import org.apache.archiva.redback.components.registry.RegistryListener;
import org.springframework.stereotype.Service;
+import java.util.List;
+import java.util.Locale;
+
@Service("archivaConfiguration#mocked")
public class StubConfiguration
implements ArchivaConfiguration
{
// no op
}
+
+ @Override
+ public Locale getDefaultLocale( )
+ {
+ return Locale.getDefault();
+ }
+
+ @Override
+ public List<Locale.LanguageRange> getLanguagePriorities( )
+ {
+ return Locale.LanguageRange.parse( "en,fr,de" );
+ }
}