diff options
author | Olivier Lamy <olamy@apache.org> | 2013-05-29 13:17:49 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2013-05-29 13:17:49 +0000 |
commit | ecbb16c6e28358024e46ec830552f796b034633a (patch) | |
tree | 70f873f7f3ec2e3ddbb7c19b9863faa5835b417f /archiva-modules/metadata/metadata-repository-api/src/test | |
parent | df15038b49ac445ca5052a30e23e2aa4bab6e668 (diff) | |
download | archiva-ecbb16c6e28358024e46ec830552f796b034633a.tar.gz archiva-ecbb16c6e28358024e46ec830552f796b034633a.zip |
prevent NPE with testing first
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1487473 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/metadata/metadata-repository-api/src/test')
-rw-r--r-- | archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java b/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java index 2cd0fcf13..28b9b458f 100644 --- a/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java +++ b/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java @@ -53,8 +53,8 @@ import java.util.List; import java.util.Map; import java.util.TimeZone; -@RunWith(ArchivaSpringJUnit4ClassRunner.class) -@ContextConfiguration(locations = { "classpath*:/META-INF/spring-context.xml", "classpath*:/spring-context.xml" }) +@RunWith( ArchivaSpringJUnit4ClassRunner.class ) +@ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml", "classpath*:/spring-context.xml" } ) public abstract class AbstractMetadataRepositoryTest extends TestCase { @@ -188,6 +188,7 @@ public abstract class AbstractMetadataRepositoryTest // test that namespace and project is also constructed assertEquals( Collections.singletonList( TEST_NAMESPACE ), repository.getRootNamespaces( TEST_REPO_ID ) ); ProjectMetadata projectMetadata = repository.getProject( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT ); + assertNotNull( projectMetadata ); assertEquals( TEST_PROJECT, projectMetadata.getId() ); assertEquals( TEST_NAMESPACE, projectMetadata.getNamespace() ); } |