summaryrefslogtreecommitdiffstats
path: root/archiva-web
diff options
context:
space:
mode:
authorJoakim Erdfelt <joakime@apache.org>2007-10-11 00:18:02 +0000
committerJoakim Erdfelt <joakime@apache.org>2007-10-11 00:18:02 +0000
commit9aa41ce31bdb3161d0a60482e0a7148e57b74056 (patch)
treece291e2fb4584d79710e93029a4fec30d7e0891a /archiva-web
parent731955abe900adcae2711289fcbdfba295840b16 (diff)
downloadarchiva-9aa41ce31bdb3161d0a60482e0a7148e57b74056.tar.gz
archiva-9aa41ce31bdb3161d0a60482e0a7148e57b74056.zip
Fixing event triggers.
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@583648 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-web')
-rw-r--r--archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/repository/RepositoryServletTest.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/repository/RepositoryServletTest.java b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/repository/RepositoryServletTest.java
index 781cb229a..b9613f9ed 100644
--- a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/repository/RepositoryServletTest.java
+++ b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/repository/RepositoryServletTest.java
@@ -26,6 +26,7 @@ import com.meterware.servletunit.ServletRunner;
import com.meterware.servletunit.ServletUnitClient;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.Configuration;
+import org.apache.maven.archiva.configuration.ConfigurationEvent;
import org.apache.maven.archiva.configuration.IndeterminateConfigurationException;
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.codehaus.plexus.PlexusConstants;
@@ -107,7 +108,7 @@ public class RepositoryServletTest
Configuration c = configuration.getConfiguration();
c.removeManagedRepository( c.findManagedRepositoryById( REPOSITORY_ID ) );
// TODO it would be better to use a mock configuration and "save" to more accurately reflect the calls made
- triggerConfigurationChange( servlet, "managedRepositories.managedRepository(0).id", REPOSITORY_ID );
+ servlet.configurationEvent( new ConfigurationEvent( ConfigurationEvent.SAVED) );
ManagedRepositoryConfiguration repository = servlet.getRepository( REPOSITORY_ID );
assertNull( repository );
@@ -125,7 +126,7 @@ public class RepositoryServletTest
repo.setName( NEW_REPOSITORY_NAME );
c.addManagedRepository( repo );
// TODO it would be better to use a mock configuration and "save" to more accurately reflect the calls made
- triggerConfigurationChange( servlet, "managedRepositories.managedRepository(2).id", NEW_REPOSITORY_ID );
+ servlet.configurationEvent( new ConfigurationEvent( ConfigurationEvent.SAVED) );
ManagedRepositoryConfiguration repository = servlet.getRepository( NEW_REPOSITORY_ID );
assertNotNull( repository );
@@ -136,10 +137,4 @@ public class RepositoryServletTest
assertNotNull( repository );
assertEquals( "Archiva Managed Internal Repository", repository.getName() );
}
-
- private void triggerConfigurationChange( RepositoryServlet servlet, String name, String value )
- {
- servlet.beforeConfigurationChange( null, name, value );
- servlet.afterConfigurationChange( null, name, value );
- }
}