prevent NPE with testing first

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1487473 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2013-05-29 13:17:49 +00:00
parent df15038b49
commit ecbb16c6e2
1 changed files with 3 additions and 2 deletions

View File

@ -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() );
}