From f4732a184a0eead8a750d1e0d7bfcccfd17c7f02 Mon Sep 17 00:00:00 2001 From: "Maria Odea B. Ching" Date: Mon, 7 Jun 2010 08:20:58 +0000 Subject: [PATCH] fixed formatting git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@952137 13f79535-47bb-0310-9956-ffa450edef68 --- .../web/action/ShowArtifactActionTest.java | 24 +++++++++---------- .../AbstractMetadataRepositoryTest.java | 18 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/ShowArtifactActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/ShowArtifactActionTest.java index 14bce5300..b9edaa3d0 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/ShowArtifactActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/ShowArtifactActionTest.java @@ -404,7 +404,7 @@ public class ShowArtifactActionTest public void testAddAndDeleteMetadataProperty() { ProjectVersionMetadata versionMetadata = createProjectModel( TEST_VERSION ); - + metadataResolver.setProjectVersion( TEST_REPO, TEST_GROUP_ID, TEST_ARTIFACT_ID, versionMetadata ); setActionParameters(); @@ -416,38 +416,38 @@ public class ShowArtifactActionTest assertActionSuccess( action, result ); assertActionParameters( action ); - + Map genericMetadata = action.getGenericMetadata(); assertNotNull( genericMetadata.get( TEST_GENERIC_METADATA_PROPERTY_NAME ) ); assertEquals( genericMetadata.get( TEST_GENERIC_METADATA_PROPERTY_NAME ), TEST_GENERIC_METADATA_PROPERTY_VALUE ); - + assertNotNull( genericMetadata.get( "foo" ) ); assertEquals( "bar", genericMetadata.get( "foo" ) ); - + assertEquals( TEST_REPO, action.getRepositoryId() ); assertNotNull( action.getModel() ); assertNull( action.getDependees() ); assertNull( action.getDependencies() ); assertNull( action.getMailingLists() ); - assertTrue( action.getArtifacts().isEmpty() ); - + assertTrue( action.getArtifacts().isEmpty() ); + // test delete property setActionParameters(); action.setDeleteItem( "foo" ); - + result = action.deleteMetadataEntry(); - + assertEquals( Action.SUCCESS, result ); assertActionParameters( action ); assertTrue( !action.getActionMessages().isEmpty() ); assertTrue( action.getActionMessages().contains( "Property successfully deleted." ) ); - + genericMetadata = action.getGenericMetadata(); assertNotNull( genericMetadata.get( TEST_GENERIC_METADATA_PROPERTY_NAME ) ); assertEquals( genericMetadata.get( TEST_GENERIC_METADATA_PROPERTY_NAME ), TEST_GENERIC_METADATA_PROPERTY_VALUE ); - + assertNull( genericMetadata.get( "foo" ) ); - + assertEquals( TEST_REPO, action.getRepositoryId() ); assertNotNull( action.getModel() ); assertNull( action.getDependees() ); @@ -455,7 +455,7 @@ public class ShowArtifactActionTest assertNull( action.getMailingLists() ); assertTrue( action.getArtifacts().isEmpty() ); } - + private void assertArtifacts( List expectedArtifacts, Map> artifactMap ) { 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 d301bbf14..ca59dcc56 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 @@ -170,27 +170,27 @@ public abstract class AbstractMetadataRepositoryTest { ProjectVersionMetadata metadata = new ProjectVersionMetadata(); metadata.setId( TEST_PROJECT_VERSION ); - - Map additionalProps = new HashMap(); + + Map additionalProps = new HashMap(); additionalProps.put( "deleteKey", "deleteValue" ); - + MetadataFacet facet = new TestMetadataFacet( TEST_FACET_ID, "baz", additionalProps ); metadata.addFacet( facet ); 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() ); - + TestMetadataFacet testFacet = (TestMetadataFacet) metadata.getFacet( TEST_FACET_ID ); Map facetProperties = testFacet.toProperties(); - + assertEquals( "deleteValue", facetProperties.get( "deleteKey" ) ); - + facetProperties.remove( "deleteKey" ); - - TestMetadataFacet newTestFacet = new TestMetadataFacet( TEST_FACET_ID, testFacet.getValue(), facetProperties ); + + TestMetadataFacet newTestFacet = new TestMetadataFacet( TEST_FACET_ID, testFacet.getValue(), facetProperties ); metadata.addFacet( newTestFacet ); - + repository.updateProjectVersion( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, metadata ); metadata = repository.getProjectVersion( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION ); -- 2.39.5