sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomm...@apache.org
Subject svn commit: r1560310 - /sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/serialization/impl/DefaultReplicationPackageImporterTest.java
Date Wed, 22 Jan 2014 10:49:30 GMT
Author: tommaso
Date: Wed Jan 22 10:49:30 2014
New Revision: 1560310

URL: http://svn.apache.org/r1560310
Log:
SLING-3330 - added asynchronous package import, fixed test

Modified:
    sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/serialization/impl/DefaultReplicationPackageImporterTest.java

Modified: sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/serialization/impl/DefaultReplicationPackageImporterTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/serialization/impl/DefaultReplicationPackageImporterTest.java?rev=1560310&r1=1560309&r2=1560310&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/serialization/impl/DefaultReplicationPackageImporterTest.java
(original)
+++ sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/serialization/impl/DefaultReplicationPackageImporterTest.java
Wed Jan 22 10:49:30 2014
@@ -21,8 +21,6 @@ package org.apache.sling.replication.ser
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 import java.lang.reflect.Field;
-import java.util.Collection;
-import java.util.LinkedList;
 import java.util.Map;
 import org.apache.sling.event.jobs.Job;
 import org.apache.sling.event.jobs.JobBuilder;
@@ -113,13 +111,10 @@ public class DefaultReplicationPackageIm
         ReplicationPackageBuilder packageBuilder = mock(ReplicationPackageBuilder.class);
         ReplicationPackage replicationPackage = new VoidReplicationPackage(new ReplicationRequest(System.currentTimeMillis(),
ReplicationActionType.DELETE, "/content"), "void");
         when(packageBuilder.readPackage(any(InputStream.class), eq(true))).thenReturn(replicationPackage);
-        Collection<ReplicationPackageBuilder> packageBuilders = new LinkedList<ReplicationPackageBuilder>();
-        packageBuilders.add(packageBuilder);
-        when(replicationPackageBuilderProvider.getAvailableReplicationPackageBuilders()).thenReturn(packageBuilders);
         replicationPackageBuilderProviderField.set(importer, replicationPackageBuilderProvider);
 
         InputStream stream = mock(InputStream.class);
-        assertTrue(importer.importStream(stream, null));
+        assertFalse(importer.importStream(stream, null));
     }
 
     @Test



Mime
View raw message