aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2013-06-11 11:38:30 +0000
committerOlivier Lamy <olamy@apache.org>2013-06-11 11:38:30 +0000
commitfe46c1491d89ddf36d5da3f2731075977d40b65b (patch)
tree9dcc5636b991ed6a7e8392aee102edd7bcd901c0
parentfdde117bcd03be4f27650c2a2e9e965778c824df (diff)
downloadarchiva-fe46c1491d89ddf36d5da3f2731075977d40b65b.tar.gz
archiva-fe46c1491d89ddf36d5da3f2731075977d40b65b.zip
remove commented code
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1491750 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java27
1 files changed, 7 insertions, 20 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 a5ec38a80..3f10e0624 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
@@ -250,12 +250,10 @@ public abstract class AbstractMetadataRepositoryTest
Assertions.assertThat( mailingLists ).isNotNull().isNotEmpty().hasSize( 1 );
- //assertEquals( 1, metadata.getMailingLists().size() );
mailingList = metadata.getMailingLists().get( 0 );
assertEquals( "Foo List", mailingList.getName() );
List<String> others = mailingList.getOtherArchives();
- //assertEquals( Collections.<String>emptyList(), mailingList.getOtherArchives() );
Assertions.assertThat( others ).isNotNull().isEmpty();
}
@@ -451,7 +449,7 @@ 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.singleton( TEST_FACET_ID ), metadata.getFacetIds() );
+
Assertions.assertThat( metadata.getFacetIds() ).isNotNull().isNotEmpty().hasSize( 1 ).contains( TEST_FACET_ID );
TestMetadataFacet testFacet = (TestMetadataFacet) metadata.getFacet( TEST_FACET_ID );
@@ -467,7 +465,7 @@ 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.singleton( TEST_FACET_ID ), metadata.getFacetIds() );
+
Assertions.assertThat( metadata.getFacetIds() ).isNotNull().isNotEmpty().hasSize( 1 ).contains( TEST_FACET_ID );
testFacet = (TestMetadataFacet) metadata.getFacet( TEST_FACET_ID );
assertFalse( testFacet.toProperties().containsKey( "deleteKey" ) );
@@ -520,10 +518,10 @@ public abstract class AbstractMetadataRepositoryTest
Collection<ArtifactMetadata> artifacts =
repository.getArtifacts( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION );
- //assertEquals( 1, artifacts.size() );
+
Assertions.assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 1 );
metadata = artifacts.iterator().next();
- //assertEquals( Collections.singleton( TEST_FACET_ID ), metadata.getFacetIds() );
+
Collection<String> ids = metadata.getFacetIds();
Assertions.assertThat( ids ).isNotNull().isNotEmpty().hasSize( 1 ).contains( TEST_FACET_ID );
@@ -540,15 +538,15 @@ 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() );
+
Assertions.assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 1 );
metadata = artifacts.iterator().next();
- //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" ) );
+
Map<String, String> props = testFacet.toProperties();
Assertions.assertThat( props ).isNotNull().doesNotContainKey( "deleteKey" );
}
@@ -842,7 +840,6 @@ public abstract class AbstractMetadataRepositoryTest
Assertions.assertThat( versions ).isNotNull().isNotEmpty().hasSize( 1 ).containsExactly( TEST_PROJECT_VERSION );
- //assertEquals( Collections.singleton( TEST_PROJECT_VERSION ), versions );
}
@Test
@@ -945,8 +942,6 @@ public abstract class AbstractMetadataRepositoryTest
List<ArtifactMetadata> artifacts = repository.getArtifactsByDateRange( TEST_REPO_ID, null, upper );
- //assertTrue( .isEmpty() );
-
Assertions.assertThat( artifacts ).isNotNull().isEmpty();
}
@@ -1030,18 +1025,14 @@ public abstract class AbstractMetadataRepositoryTest
Collection<String> namespaces = repository.getRootNamespaces( TEST_REPO_ID );
- //assertEquals( Arrays.asList( "org" ), repository.getRootNamespaces( TEST_REPO_ID ) );
Assertions.assertThat( namespaces ).isNotNull().isNotEmpty().hasSize( 1 ).contains( "org" );
- //assertEquals( Arrays.asList( "apache" ), repository.getNamespaces( TEST_REPO_ID, "org" ) );
namespaces = repository.getNamespaces( TEST_REPO_ID, "org" );
Assertions.assertThat( namespaces ).isNotNull().isNotEmpty().hasSize( 1 ).contains( "apache" );
- //assertEquals( Arrays.asList( "maven" ), repository.getNamespaces( TEST_REPO_ID, "org.apache" ) );
namespaces = repository.getNamespaces( TEST_REPO_ID, "org.apache" );
Assertions.assertThat( namespaces ).isNotNull().isNotEmpty().hasSize( 1 ).contains( "maven" );
- //assertEquals( Arrays.asList( "shared" ), repository.getNamespaces( TEST_REPO_ID, "org.apache.maven" ) );
namespaces = repository.getNamespaces( TEST_REPO_ID, "org.apache.maven" );
Assertions.assertThat( namespaces ).isNotNull().isNotEmpty().hasSize( 1 ).contains( "shared" );
}
@@ -1061,7 +1052,6 @@ public abstract class AbstractMetadataRepositoryTest
Assertions.assertThat( namespaces ).isNotNull().isEmpty();
- //assertEquals( Collections.<String>emptyList(), );
}
@Test
@@ -1344,9 +1334,6 @@ public abstract class AbstractMetadataRepositoryTest
log.info( "artifactMetadatas: {}", artifactMetadatas );
- //assertEquals( Collections.singletonList( artifact ), new ArrayList<ArtifactMetadata>(
- // repository.getArtifacts( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, "2.0-SNAPSHOT" ) ) );
-
repository.removeArtifact( artifactOne, "2.0-SNAPSHOT" );
artifactMetadatas = repository.getArtifacts( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, "2.0-SNAPSHOT" );