diff options
author | Olivier Lamy <olamy@apache.org> | 2015-10-06 17:27:07 +1100 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2015-10-06 17:27:07 +1100 |
commit | aabbc2d52c1e3bef7222ea043766301ce21c602c (patch) | |
tree | e91618143da2c6ff589f4b87a0079e499b68b7ec /archiva-modules/archiva-base/archiva-consumers | |
parent | 8c67ef5e755b9569d5b4edeba152a06d6e66443e (diff) | |
download | archiva-aabbc2d52c1e3bef7222ea043766301ce21c602c.tar.gz archiva-aabbc2d52c1e3bef7222ea043766301ce21c602c.zip |
add more mock for consumer archetype test
Diffstat (limited to 'archiva-modules/archiva-base/archiva-consumers')
3 files changed, 10 insertions, 7 deletions
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/SimpleArtifactConsumerTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/SimpleArtifactConsumerTest.java index 095873c62..1b44182e4 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/SimpleArtifactConsumerTest.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/SimpleArtifactConsumerTest.java @@ -66,12 +66,6 @@ public class SimpleArtifactConsumerTest throws Exception { setUpMockRepository(); - - RepositorySession repositorySession = mock( RepositorySession.class ); - when( repositorySessionFactory.createSession() ).thenReturn( repositorySession ); - - metadataRepository = mock( MetadataRepository.class ); - when( repositorySession.getRepository() ).thenReturn( metadataRepository ); } private void setUpMockRepository() diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/spring-context.xml index 8a12f3a17..cd7557742 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/spring-context.xml @@ -29,5 +29,8 @@ <mockito:mock id="mockManagedRepositoryAdmin" class="org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin" /> <mockito:mock id="mockRemoteRepositoryAdmin" class="org.apache.archiva.admin.model.remote.RemoteRepositoryAdmin" /> - <alias alias="repositorySessionFactory#jcr" name="repositorySessionFactory#mock" /> + <alias alias="repositorySessionFactory#jcr" name="repositorySessionFactory#file" /> + + <bean name="proxyConnectorAdmin#mock" class="org.apache.archiva.mock.MockProxyConnectorAdmin"/> + <bean name="networkProxyAdmin#mock" class="org.apache.archiva.mock.MockNetworkProxyAdmin"/> </beans>
\ No newline at end of file diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml index b6d031939..64a39f63c 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml @@ -162,6 +162,12 @@ <scope>test</scope> </dependency> <dependency> + <groupId>org.apache.archiva</groupId> + <artifactId>metadata-store-file</artifactId> + <version>${archiva.version}</version> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> <version>${log4j.version}</version> |