diff options
author | Martin Schreier <martin_s@apache.org> | 2022-01-04 20:46:35 +0100 |
---|---|---|
committer | Martin Schreier <martin_s@apache.org> | 2022-01-04 20:46:35 +0100 |
commit | e236e7f98d2849e96aea56cdc4e308a2911fe8f0 (patch) | |
tree | eaa583e66ee8f8ebc0d074965caf4e551d912a93 /archiva-modules/archiva-maven/archiva-maven-repository/src | |
parent | 3756ba57f6ebc5e3d256c25c220ae5b83f41eb22 (diff) | |
download | archiva-e236e7f98d2849e96aea56cdc4e308a2911fe8f0.tar.gz archiva-e236e7f98d2849e96aea56cdc4e308a2911fe8f0.zip |
Unifying mocks to mockito
Diffstat (limited to 'archiva-modules/archiva-maven/archiva-maven-repository/src')
-rw-r--r-- | archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/maven/repository/metadata/storage/mock/MockConfiguration.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/maven/repository/metadata/storage/mock/MockConfiguration.java b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/maven/repository/metadata/storage/mock/MockConfiguration.java index a9dd1e419..a5de3eaeb 100644 --- a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/maven/repository/metadata/storage/mock/MockConfiguration.java +++ b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/maven/repository/metadata/storage/mock/MockConfiguration.java @@ -29,7 +29,6 @@ import org.apache.archiva.configuration.FileType; import org.apache.archiva.configuration.IndeterminateConfigurationException; import org.apache.archiva.configuration.RepositoryScanningConfiguration; import org.apache.commons.lang3.StringUtils; -import org.easymock.IMocksControl; import org.springframework.stereotype.Service; import java.nio.file.Path; @@ -40,7 +39,7 @@ import java.util.List; import java.util.Locale; import java.util.Set; -import static org.easymock.EasyMock.createNiceControl; +import static org.mockito.Mockito.mock; /** * MockConfiguration @@ -57,14 +56,11 @@ public class MockConfiguration private Set<RegistryListener> registryListeners = new HashSet<RegistryListener>(); private Set<ConfigurationListener> configListeners = new HashSet<ConfigurationListener>(); - private IMocksControl registryControl; - private Registry registryMock; public MockConfiguration() { - registryControl = createNiceControl(); - registryMock = registryControl.createMock( Registry.class ); + registryMock = mock( Registry.class ); configuration.setArchivaRuntimeConfiguration(new ArchivaRuntimeConfiguration()); configuration.getArchivaRuntimeConfiguration().addChecksumType("sha1"); configuration.getArchivaRuntimeConfiguration().addChecksumType("sha256"); |