diff options
author | Olivier Lamy <olamy@apache.org> | 2013-06-09 12:22:30 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2013-06-09 12:22:30 +0000 |
commit | 1f226824a4b2cf6bbc2a0e83cd65b33513282e03 (patch) | |
tree | 5fc0ee3ee3513b6171b1eeab5f6b931aa08b67e1 /archiva-modules | |
parent | 2ed2de07a05a164df19fa40167e912cd6ee6301d (diff) | |
download | archiva-1f226824a4b2cf6bbc2a0e83cd65b33513282e03.tar.gz archiva-1f226824a4b2cf6bbc2a0e83cd65b33513282e03.zip |
use fest assert
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1491195 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r-- | archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java | 19 |
1 files changed, 14 insertions, 5 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 f3a15a6da..cdcf1ed59 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 @@ -511,9 +511,12 @@ public abstract class AbstractMetadataRepositoryTest Collection<ArtifactMetadata> artifacts = repository.getArtifacts( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION ); - assertEquals( 1, artifacts.size() ); + //assertEquals( 1, artifacts.size() ); + Assertions.assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 1 ); metadata = artifacts.iterator().next(); - assertEquals( Collections.singleton( TEST_FACET_ID ), metadata.getFacetIds() ); + //assertEquals( Collections.singleton( TEST_FACET_ID ), metadata.getFacetIds() ); + Collection<String> ids = metadata.getFacetIds(); + Assertions.assertThat( ids ).isNotNull().isNotEmpty().hasSize( 1 ).contains( TEST_FACET_ID ); TestMetadataFacet testFacet = (TestMetadataFacet) metadata.getFacet( TEST_FACET_ID ); Map<String, String> facetProperties = testFacet.toProperties(); @@ -528,11 +531,17 @@ public abstract class AbstractMetadataRepositoryTest repository.updateArtifact( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION, metadata ); artifacts = repository.getArtifacts( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION ); - assertEquals( 1, artifacts.size() ); + //assertEquals( 1, artifacts.size() ); + Assertions.assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 1 ); metadata = artifacts.iterator().next(); - assertEquals( Collections.singleton( TEST_FACET_ID ), metadata.getFacetIds() ); + //assertEquals( Collections.singleton( TEST_FACET_ID ), metadata.getFacetIds() ); + ids = metadata.getFacetIds(); + Assertions.assertThat( ids ).isNotNull().isNotEmpty().hasSize( 1 ).contains( TEST_FACET_ID ); + testFacet = (TestMetadataFacet) metadata.getFacet( TEST_FACET_ID ); - assertFalse( testFacet.toProperties().containsKey( "deleteKey" ) ); + //assertFalse( testFacet.toProperties().containsKey( "deleteKey" ) ); + Map<String,String> props = testFacet.toProperties(); + Assertions.assertThat( props ).isNotNull().doesNotContainKey( "deleteKey" ); } @Test |