archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1487473 - /archiva/trunk/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java
Date Wed, 29 May 2013 13:17:50 GMT
Author: olamy
Date: Wed May 29 13:17:49 2013
New Revision: 1487473

URL: http://svn.apache.org/r1487473
Log:
prevent NPE with testing first

Modified:
    archiva/trunk/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java

Modified: archiva/trunk/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java?rev=1487473&r1=1487472&r2=1487473&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java
(original)
+++ archiva/trunk/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java
Wed May 29 13:17:49 2013
@@ -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 AbstractMetadataRe
         // 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() );
     }



Mime
View raw message