syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ashaki...@apache.org
Subject svn commit: r1439358 - in /syncope/trunk/core/src/test: java/org/apache/syncope/core/rest/AbstractTest.java java/org/apache/syncope/core/rest/NotificationTestITCase.java resources/content.xml
Date Mon, 28 Jan 2013 12:01:42 GMT
Author: ashakirin
Date: Mon Jan 28 12:01:42 2013
New Revision: 1439358

URL: http://svn.apache.org/viewvc?rev=1439358&view=rev
Log:
[SYNCOPE-289] Notification with 101 isn't needed anymore. Removed parameterized from AbstractTest

Modified:
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/AbstractTest.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/NotificationTestITCase.java
    syncope/trunk/core/src/test/resources/content.xml

Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/AbstractTest.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/AbstractTest.java?rev=1439358&r1=1439357&r2=1439358&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/AbstractTest.java (original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/AbstractTest.java Mon Jan
28 12:01:42 2013
@@ -21,8 +21,6 @@ package org.apache.syncope.core.rest;
 import static org.junit.Assert.assertNotNull;
 
 import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
 import java.util.List;
 import java.util.UUID;
 
@@ -69,7 +67,6 @@ import org.apache.syncope.common.to.Attr
 import org.apache.syncope.common.validation.SyncopeClientErrorHandler;
 import org.junit.Before;
 import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized.Parameters;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -297,10 +294,4 @@ public abstract class AbstractTest {
         attr.addValueToBeAdded(valueToBeAdded);
         return attr;
     }
-
-    @Parameters
-    public static Collection<Object[]> data() {
-        Object[][] data = new Object[][] { { "application/json" } };
-        return Arrays.asList(data);
-    }
 }

Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/NotificationTestITCase.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/NotificationTestITCase.java?rev=1439358&r1=1439357&r2=1439358&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/NotificationTestITCase.java
(original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/NotificationTestITCase.java
Mon Jan 28 12:01:42 2013
@@ -106,17 +106,10 @@ public class NotificationTestITCase exte
 
     @Test
     public void delete() {
-    	NotificationTO notification = null;
-    	try {
-    		// Check for pre-loaded notification: must be deleted for other create tests success
-    		notification = notificationService.read(101L);
-    	} catch (SyncopeClientCompositeErrorException e) {
-    		assertNotNull(e.getException(SyncopeClientExceptionType.NotFound));
-    		notification = buildNotificationTO();
-            notification.setSelfAsRecipient(true);
-            Response response = notificationService.create(notification);
-            notification = response.readEntity(NotificationTO.class);
-    	}
+    	NotificationTO notification = buildNotificationTO();
+        notification.setSelfAsRecipient(true);
+        Response response = notificationService.create(notification);
+        notification = getObject(response, NotificationTO.class, notificationService);
 
         NotificationTO deletedNotification = notificationService.delete(notification.getId());
         assertNotNull(deletedNotification);

Modified: syncope/trunk/core/src/test/resources/content.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/resources/content.xml?rev=1439358&r1=1439357&r2=1439358&view=diff
==============================================================================
--- syncope/trunk/core/src/test/resources/content.xml (original)
+++ syncope/trunk/core/src/test/resources/content.xml Mon Jan 28 12:01:42 2013
@@ -762,14 +762,14 @@ under the License.
                 xmlAbout="%3Corg.apache.syncope.common.search.NodeCond%3E%0A++%3Ctype%3EAND%3C%2Ftype%3E%0A++%3CleftNodeCond%3E%0A++++%3Ctype%3ELEAF%3C%2Ftype%3E%0A++++%3CattributeCond%3E%0A++++++%3Ctype%3ELIKE%3C%2Ftype%3E%0A++++++%3Cschema%3Efullname%3C%2Fschema%3E%0A++++++%3Cexpression%3E%25o%25%3C%2Fexpression%3E%0A++++%3C%2FattributeCond%3E%0A++%3C%2FleftNodeCond%3E%0A++%3CrightNodeCond%3E%0A++++%3Ctype%3ELEAF%3C%2Ftype%3E%0A++++%3CattributeCond%3E%0A++++++%3Ctype%3ELIKE%3C%2Ftype%3E%0A++++++%3Cschema%3Efullname%3C%2Fschema%3E%0A++++++%3Cexpression%3E%25i%25%3C%2Fexpression%3E%0A++++%3C%2FattributeCond%3E%0A++%3C%2FrightNodeCond%3E%0A%3C%2Forg.apache.syncope.common.search.NodeCond%3E"
                 xmlRecipients="%3Corg.apache.syncope.common.search.NodeCond%3E%0A++%3Ctype%3ELEAF%3C%2Ftype%3E%0A++%3CmembershipCond%3E%0A++++%3CroleId%3E7%3C%2FroleId%3E%0A++%3C%2FmembershipCond%3E%0A%3C%2Forg.apache.syncope.common.search.NodeCond%3E"
                 recipientAttrType="UserSchema" recipientAttrName="email"/>
-  <Notification id="101" sender="test@syncope.apache.org" subject="Test subject" template="test"
selfAsRecipient="0" traceLevel="ALL"
+  <!--Notification id="101" sender="test@syncope.apache.org" subject="Test subject" template="test"
selfAsRecipient="0" traceLevel="ALL"
                 xmlAbout="%3Corg.apache.syncope.common.search.NodeCond%3E%0A++%3Ctype%3EAND%3C%2Ftype%3E%0A++%3CleftNodeCond%3E%0A++++%3Ctype%3ELEAF%3C%2Ftype%3E%0A++++%3CattributeCond%3E%0A++++++%3Ctype%3ELIKE%3C%2Ftype%3E%0A++++++%3Cschema%3Efullname%3C%2Fschema%3E%0A++++++%3Cexpression%3E%25o%25%3C%2Fexpression%3E%0A++++%3C%2FattributeCond%3E%0A++%3C%2FleftNodeCond%3E%0A++%3CrightNodeCond%3E%0A++++%3Ctype%3ELEAF%3C%2Ftype%3E%0A++++%3CattributeCond%3E%0A++++++%3Ctype%3ELIKE%3C%2Ftype%3E%0A++++++%3Cschema%3Efullname%3C%2Fschema%3E%0A++++++%3Cexpression%3E%25i%25%3C%2Fexpression%3E%0A++++%3C%2FattributeCond%3E%0A++%3C%2FrightNodeCond%3E%0A%3C%2Forg.apache.syncope.common.search.NodeCond%3E"
                 xmlRecipients="%3Corg.apache.syncope.common.search.NodeCond%3E%0A++%3Ctype%3ELEAF%3C%2Ftype%3E%0A++%3CmembershipCond%3E%0A++++%3CroleId%3E7%3C%2FroleId%3E%0A++%3C%2FmembershipCond%3E%0A%3C%2Forg.apache.syncope.common.search.NodeCond%3E"
-                recipientAttrType="UserSchema" recipientAttrName="email"/>
+                recipientAttrType="UserSchema" recipientAttrName="email"/-->
   <Notification_events Notification_id="100" events="unexisting1"/>
   <Notification_events Notification_id="100" events="unexisting2"/>
-  <Notification_events Notification_id="101" events="unexisting1"/>
-  <Notification_events Notification_id="101" events="unexisting2"/>
+  <!--Notification_events Notification_id="101" events="unexisting1"/-->
+  <!--Notification_events Notification_id="101" events="unexisting2"/-->
     
   <Report id="1" name="test"/>
   <ReportletConfInstance id="1" Report_id="1" serializedInstance="%3Corg.apache.syncope.common.report.UserReportletConf%3E%0A++%3Cname%3EtestUserReportlet%3C%2Fname%3E%0A++%3Cattrs%3E%0A++++%3Cstring%3Efullname%3C%2Fstring%3E%0A++++%3Cstring%3Egender%3C%2Fstring%3E%0A++%3C%2Fattrs%3E%0A++%3CderAttrs+class%3D%22singleton-list%22%3E%0A++++%3Cstring%3Ecn%3C%2Fstring%3E%0A++%3C%2FderAttrs%3E%0A++%3CvirAttrs+class%3D%22singleton-list%22%3E%0A++++%3Cstring%3Evirtualdata%3C%2Fstring%3E%0A++%3C%2FvirAttrs%3E%0A++%3Cfeatures+class%3D%22java.util.Arrays%24ArrayList%22%3E%0A++++%3Ca+class%3D%22org.apache.syncope.common.report.UserReportletConf%24Feature-array%22%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3Eid%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3Eusername%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.co
 mmon.report.UserReportletConf_-Feature%3EworkflowId%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3Estatus%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3EcreationDate%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3ElastLoginDate%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3EchangePwdDate%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3EpasswordHistorySize%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3EfailedLoginCount%3C%2Fo
 rg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3Ememberships%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3Eresources%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++%3C%2Fa%3E%0A++%3C%2Ffeatures%3E%0A%3C%2Forg.apache.syncope.common.report.UserReportletConf%3E"/>



Mime
View raw message