Search in sources :

Example 1 with ManagedRepositoryContentMock

use of org.apache.archiva.repository.mock.ManagedRepositoryContentMock in project archiva by apache.

the class ContentItemTest method setup.

@BeforeEach
public void setup() throws IOException {
    this.repository = new ManagedRepositoryContentMock();
    this.storage = new FilesystemStorage(Paths.get("target"), new DefaultFileLockManager());
    this.asset = storage.getRoot();
}
Also used : FilesystemStorage(org.apache.archiva.repository.storage.fs.FilesystemStorage) DefaultFileLockManager(org.apache.archiva.common.filelock.DefaultFileLockManager) ManagedRepositoryContentMock(org.apache.archiva.repository.mock.ManagedRepositoryContentMock) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with ManagedRepositoryContentMock

use of org.apache.archiva.repository.mock.ManagedRepositoryContentMock in project archiva by apache.

the class BasicRepositoryGroupValidatorTest method createRepository.

protected EditableManagedRepository createRepository(String id, String name, Path location) throws IOException {
    BasicManagedRepository repo = BasicManagedRepository.newFilesystemInstance(id, name, location);
    repo.setLocation(location.toAbsolutePath().toUri());
    repo.setContent(new ManagedRepositoryContentMock());
    return repo;
}
Also used : BasicManagedRepository(org.apache.archiva.repository.base.managed.BasicManagedRepository) ManagedRepositoryContentMock(org.apache.archiva.repository.mock.ManagedRepositoryContentMock)

Example 3 with ManagedRepositoryContentMock

use of org.apache.archiva.repository.mock.ManagedRepositoryContentMock in project archiva by apache.

the class BasicManagedRepositoryValidatorTest method createRepository.

protected EditableManagedRepository createRepository(String id, String name, Path location) throws IOException {
    FileLockManager lockManager = new DefaultFileLockManager();
    FilesystemStorage storage = new FilesystemStorage(location.toAbsolutePath(), lockManager);
    BasicManagedRepository repo = new BasicManagedRepository(id, name, storage);
    repo.setLocation(location.toAbsolutePath().toUri());
    repo.setContent(new ManagedRepositoryContentMock());
    return repo;
}
Also used : FileLockManager(org.apache.archiva.common.filelock.FileLockManager) DefaultFileLockManager(org.apache.archiva.common.filelock.DefaultFileLockManager) FilesystemStorage(org.apache.archiva.repository.storage.fs.FilesystemStorage) DefaultFileLockManager(org.apache.archiva.common.filelock.DefaultFileLockManager) ManagedRepositoryContentMock(org.apache.archiva.repository.mock.ManagedRepositoryContentMock)

Aggregations

ManagedRepositoryContentMock (org.apache.archiva.repository.mock.ManagedRepositoryContentMock)3 DefaultFileLockManager (org.apache.archiva.common.filelock.DefaultFileLockManager)2 FilesystemStorage (org.apache.archiva.repository.storage.fs.FilesystemStorage)2 FileLockManager (org.apache.archiva.common.filelock.FileLockManager)1 BasicManagedRepository (org.apache.archiva.repository.base.managed.BasicManagedRepository)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1