mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-07 18:25:23 +00:00
Expand a couple of replication service tests
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21247 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
parent
8fb13891c9
commit
5214729811
@ -183,6 +183,7 @@ public class ReplicationServiceIntegrationTest extends BaseAlfrescoSpringTest
|
|||||||
{
|
{
|
||||||
ReplicationDefinition replicationAction =
|
ReplicationDefinition replicationAction =
|
||||||
replicationService.createReplicationDefinition(ACTION_NAME, "Test Definition");
|
replicationService.createReplicationDefinition(ACTION_NAME, "Test Definition");
|
||||||
|
String initialId = replicationAction.getId();
|
||||||
replicationAction.getPayload().add(
|
replicationAction.getPayload().add(
|
||||||
new NodeRef("workspace://SpacesStore/Testing")
|
new NodeRef("workspace://SpacesStore/Testing")
|
||||||
);
|
);
|
||||||
@ -193,12 +194,23 @@ public class ReplicationServiceIntegrationTest extends BaseAlfrescoSpringTest
|
|||||||
|
|
||||||
replicationService.saveReplicationDefinition(replicationAction);
|
replicationService.saveReplicationDefinition(replicationAction);
|
||||||
|
|
||||||
|
// Load it again, should have the same details still
|
||||||
ReplicationDefinition retrieved =
|
ReplicationDefinition retrieved =
|
||||||
replicationService.loadReplicationDefinition(ACTION_NAME);
|
replicationService.loadReplicationDefinition(ACTION_NAME);
|
||||||
assertNotNull(retrieved);
|
assertNotNull(retrieved);
|
||||||
|
assertEquals(initialId, retrieved.getId());
|
||||||
assertEquals(ACTION_NAME, retrieved.getReplicationName());
|
assertEquals(ACTION_NAME, retrieved.getReplicationName());
|
||||||
assertEquals("Test Definition", retrieved.getDescription());
|
assertEquals("Test Definition", retrieved.getDescription());
|
||||||
assertEquals(2, retrieved.getPayload().size());
|
assertEquals(2, retrieved.getPayload().size());
|
||||||
|
|
||||||
|
// Load a 2nd copy, won't be any changes
|
||||||
|
ReplicationDefinition second =
|
||||||
|
replicationService.loadReplicationDefinition(ACTION_NAME);
|
||||||
|
assertNotNull(second);
|
||||||
|
assertEquals(initialId, second.getId());
|
||||||
|
assertEquals(ACTION_NAME, second.getReplicationName());
|
||||||
|
assertEquals("Test Definition", second.getDescription());
|
||||||
|
assertEquals(2, second.getPayload().size());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testLoadList() throws Exception
|
public void testLoadList() throws Exception
|
||||||
|
Loading…
x
Reference in New Issue
Block a user