archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1167037 - /archiva/trunk/archiva-modules/archiva-base/archiva-repository-admin/src/test/java/org/apache/archiva/admin/repository/admin/ArchivaAdministrationTest.java
Date Fri, 09 Sep 2011 08:34:17 GMT
Author: olamy
Date: Fri Sep  9 08:34:17 2011
New Revision: 1167037

URL: http://svn.apache.org/viewvc?rev=1167037&view=rev
Log:
[MRM-1512] api to configure RepositoryScanningConfiguration : more test auditlistener call
for consumers modification

Modified:
    archiva/trunk/archiva-modules/archiva-base/archiva-repository-admin/src/test/java/org/apache/archiva/admin/repository/admin/ArchivaAdministrationTest.java

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-admin/src/test/java/org/apache/archiva/admin/repository/admin/ArchivaAdministrationTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-admin/src/test/java/org/apache/archiva/admin/repository/admin/ArchivaAdministrationTest.java?rev=1167037&r1=1167036&r2=1167037&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-admin/src/test/java/org/apache/archiva/admin/repository/admin/ArchivaAdministrationTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-admin/src/test/java/org/apache/archiva/admin/repository/admin/ArchivaAdministrationTest.java
Fri Sep  9 08:34:17 2011
@@ -124,6 +124,18 @@ public class ArchivaAdministrationTest
         assertEquals( initialSize + 1,
                       archivaAdministration.getRepositoryScanning().getKnownContentConsumers().size()
);
         assertTrue( archivaAdministration.getRepositoryScanning().getKnownContentConsumers().contains(
"foo" ) );
+
+        archivaAdministration.removeKnownContentConsumer( "foo", getFakeAuditInformation()
);
+
+
+        assertEquals( initialSize ,
+                      archivaAdministration.getRepositoryScanning().getKnownContentConsumers().size()
);
+        assertFalse( archivaAdministration.getRepositoryScanning().getKnownContentConsumers().contains(
"foo" ) );
+
+        assertEquals( 2, mockAuditListener.getAuditEvents().size() );
+        assertEquals( AuditEvent.ENABLE_REPO_CONSUMER, mockAuditListener.getAuditEvents().get(
0 ).getAction() );
+        assertEquals( AuditEvent.DISABLE_REPO_CONSUMER, mockAuditListener.getAuditEvents().get(
1 ).getAction() );
+
         mockAuditListener.clearEvents();
 
     }
@@ -147,8 +159,14 @@ public class ArchivaAdministrationTest
                       archivaAdministration.getRepositoryScanning().getInvalidContentConsumers().size()
);
         assertTrue( archivaAdministration.getRepositoryScanning().getInvalidContentConsumers().contains(
"foo" ) );
 
-        assertEquals( 1, mockAuditListener.getAuditEvents().size() );
+        archivaAdministration.removeInvalidContentConsumer( "foo", getFakeAuditInformation()
);
+
+        assertEquals( initialSize, archivaAdministration.getRepositoryScanning().getInvalidContentConsumers().size()
);
+        assertFalse( archivaAdministration.getRepositoryScanning().getInvalidContentConsumers().contains(
"foo" ) );
+
+        assertEquals( 2, mockAuditListener.getAuditEvents().size() );
         assertEquals( AuditEvent.ENABLE_REPO_CONSUMER, mockAuditListener.getAuditEvents().get(
0 ).getAction() );
+        assertEquals( AuditEvent.DISABLE_REPO_CONSUMER, mockAuditListener.getAuditEvents().get(
1 ).getAction() );
 
         mockAuditListener.clearEvents();
 



Mime
View raw message