directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ersi...@apache.org
Subject svn commit: r398281 - /directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/trigger/TriggerSpecificationParserTest.java
Date Sun, 30 Apr 2006 06:06:56 GMT
Author: ersiner
Date: Sat Apr 29 23:06:55 2006
New Revision: 398281

URL: http://svn.apache.org/viewcvs?rev=398281&view=rev
Log:
Some whitespace refactoring.
Added bean population asserts to a test case method. (Had forgotten.)

Modified:
    directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/trigger/TriggerSpecificationParserTest.java

Modified: directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/trigger/TriggerSpecificationParserTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/trigger/TriggerSpecificationParserTest.java?rev=398281&r1=398280&r2=398281&view=diff
==============================================================================
--- directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/trigger/TriggerSpecificationParserTest.java
(original)
+++ directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/trigger/TriggerSpecificationParserTest.java
Sat Apr 29 23:06:55 2006
@@ -64,6 +64,15 @@
         triggerSpecification = parser.parse( spec );
         
         assertNotNull( triggerSpecification );
+        assertEquals( triggerSpecification.getActionTime(), ActionTime.BEFORE );
+        assertEquals( triggerSpecification.getStoredProcedureName(), "BackupUtilities.backupDeletedEntry"
);
+        assertEquals( triggerSpecification.getLdapOperation(), LdapOperation.DEL );
+        assertEquals( triggerSpecification.getStoredProcedureOptions().size(), 0 );
+        assertEquals( triggerSpecification.getStoredProcedureParameters().size(), 2 );
+        assertTrue( triggerSpecification.getStoredProcedureParameters().contains(
+            StoredProcedureParameter.DelStoredProcedureParameter.NAME ) );
+        assertTrue( triggerSpecification.getStoredProcedureParameters().contains(
+            StoredProcedureParameter.DelStoredProcedureParameter.DELETED_ENTRY ) );
     }
     
     public void testWithGenericParameters() throws Exception
@@ -78,8 +87,8 @@
         assertEquals( triggerSpecification.getActionTime(), ActionTime.AFTER );
         assertEquals( triggerSpecification.getStoredProcedureName(), "Logger.logAddOperation"
);
         assertEquals( triggerSpecification.getLdapOperation(), LdapOperation.ADD );
-        assertTrue( triggerSpecification.getStoredProcedureOptions().size() == 0 );
-        assertTrue( triggerSpecification.getStoredProcedureParameters().size() == 3 );
+        assertEquals( triggerSpecification.getStoredProcedureOptions().size(), 0 );
+        assertEquals( triggerSpecification.getStoredProcedureParameters().size(), 3 );
         assertTrue( triggerSpecification.getStoredProcedureParameters().contains(
             StoredProcedureParameter.AddStoredProcedureParameter.ENTRY ) );
         assertTrue( triggerSpecification.getStoredProcedureParameters().contains(
@@ -102,7 +111,8 @@
         assertEquals( triggerSpecification.getStoredProcedureName(), "RestrictionUtilities.searchNoWay"
);
         assertEquals( triggerSpecification.getLdapOperation(), LdapOperation.SEARCH );
         assertEquals( triggerSpecification.getStoredProcedureOptions().size(), 1 );
-        assertTrue( triggerSpecification.getStoredProcedureOptions().contains( new StoredProcedureLanguageOption(
"Java" ) ) );
+        assertTrue( triggerSpecification.getStoredProcedureOptions().contains(
+            new StoredProcedureLanguageOption( "Java" ) ) );
         assertEquals( triggerSpecification.getStoredProcedureParameters().size(),  0 );
     }
     
@@ -123,8 +133,9 @@
         assertEquals( triggerSpecification.getLdapOperation(), LdapOperation.BIND );
         assertEquals( triggerSpecification.getStoredProcedureOptions().size(), 1 );
         assertTrue( triggerSpecification.getStoredProcedureOptions().contains(
-            new StoredProcedureSearchContextOption( new LdapName( "cn=Auth,cn=System Stored
Procedures,ou=system" ), SearchScope.ONE  ) ) );
-        assertEquals( triggerSpecification.getStoredProcedureParameters().size(),  1 );
+            new StoredProcedureSearchContextOption(
+                new LdapName( "cn=Auth,cn=System Stored Procedures,ou=system" ), SearchScope.ONE
) ) );
+        assertEquals( triggerSpecification.getStoredProcedureParameters().size(), 1 );
         assertTrue( triggerSpecification.getStoredProcedureParameters().contains(
             StoredProcedureParameter.BindStoredProcedureParameter.NAME ) );
     }



Mime
View raw message