diff options
author | Olivier Lamy <olamy@apache.org> | 2014-03-24 01:35:54 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2014-03-24 01:35:54 +0000 |
commit | ba1c2854a0d44df1cc45084b25b4630ce9641d63 (patch) | |
tree | de1e4c98408520b99d460c9336ecc89aa9869c66 /archiva-modules/metadata/metadata-repository-api | |
parent | 63938bfb4774b0f4fa935990573e254cbf8593b2 (diff) | |
download | archiva-ba1c2854a0d44df1cc45084b25b4630ce9641d63.tar.gz archiva-ba1c2854a0d44df1cc45084b25b4630ce9641d63.zip |
use an utility methods to prevent npe when column values does not exist for a row
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1580688 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/metadata/metadata-repository-api')
-rw-r--r-- | archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java | 6 |
1 files changed, 4 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 3f10e0624..e11911671 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 @@ -424,14 +424,16 @@ public abstract class AbstractMetadataRepositoryTest repository.updateProjectVersion( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, metadata ); metadata = repository.getProjectVersion( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION ); - assertEquals( Collections.<String>emptyList(), new ArrayList<String>( metadata.getFacetIds() ) ); + + Assertions.assertThat( metadata.getFacetIds() ).isNotNull().isEmpty(); metadata = new ProjectVersionMetadata(); metadata.setId( TEST_PROJECT_VERSION ); repository.updateProjectVersion( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, metadata ); metadata = repository.getProjectVersion( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION ); - assertEquals( Collections.<String>emptyList(), new ArrayList<String>( metadata.getFacetIds() ) ); + Assertions.assertThat( metadata.getFacetIds() ).isNotNull().isEmpty(); + } @Test |