use of com.enonic.xp.node.ResolveSyncWorkResult in project xp by enonic.
the class ResolveSyncWorkCommandTest method exclude_referencies_in_the_middle.
/*
- S1 (New)
- A1 (New)
- A2 (New)
- A2_1 - Ref:B2_1 (New)
- S2 (New)
- B1 (New)
- B2 (New)
- B2_1 (New)
- S1d (New)
- A1d (New)
- A2d (New)
- A2_1d - Ref:B2_1 (New)
*/
@Test
public void exclude_referencies_in_the_middle() {
createS1S2Tree();
refresh();
final ResolveSyncWorkResult result = resolveSyncWorkResult(NodeId.from("s1"), true);
assertNodes(result, ExpectedNodes.create().implicit("s1").child("a1", "a2", "a2_1", "a2_1_1").referred("b2_1").parent("b2", "s2"));
}
use of com.enonic.xp.node.ResolveSyncWorkResult in project xp by enonic.
the class ResolveSyncWorkCommandTest method resolve_with_include_children_a1.
/*
- S1 (New)
- A1 (New)
- A2 (New)
- A2_1 - Ref:B2_1 (New)
- A2_1_1
- S2 (New)
- B1 (New)
- B2 (New)
- B2_1 (New)
Resolve: S1
*/
@Test
public void resolve_with_include_children_a1() throws Exception {
createS1S2Tree();
final ResolveSyncWorkResult result = resolveSyncWorkResult(NodeId.from("a1"), true);
assertEquals(2, result.getSize());
}
use of com.enonic.xp.node.ResolveSyncWorkResult in project xp by enonic.
the class ResolveSyncWorkCommandTest method pending_delete_with_children_and_reference.
/*
- S1 (New)
- A1 (New)
- A2 (New)
- A2_1 - Ref:B2_1 (New)
- S2 (New)
- B1 (New)
- B2 (New)
- B2_1 (New)
- S1d (New)
- A1d (New)
- A2d (New)
- A2_1d - Ref:B2_1 (New)
*/
@Test
public void pending_delete_with_children_and_reference() {
createS1S2Tree();
ResolveSyncWorkResult result = resolveSyncWorkResult(NodeId.from("s1"), true);
assertEquals(8, result.getSize());
pushAllNodesInS1S2Tree();
markAsDelete(NodeId.from("s1"));
markAsDelete(NodeId.from("s2"));
refresh();
// Since this is pending delete, it should force-include the children even it the commands give "false"
result = resolveSyncWorkResult(NodeId.from("s1"), false);
assertNodes(result, ExpectedNodes.create().implicit("s1").child("a1", "a2", "a2_1", "a2_1_1").referred("b2_1"));
result = resolveSyncWorkResult(NodeId.from("s1"), true);
assertNodes(result, ExpectedNodes.create().implicit("s1").child("a1", "a2", "a2_1", "a2_1_1").referred("b2_1"));
}
use of com.enonic.xp.node.ResolveSyncWorkResult in project xp by enonic.
the class ResolveSyncWorkCommandTest method exclude_referencies.
@Test
public void exclude_referencies() {
createS1S2Tree();
refresh();
final ResolveSyncWorkResult result = resolveSyncWorkResult(NodeId.from("s1"), NodeIds.from("b2_1"), true);
assertNodes(result, ExpectedNodes.create().implicit("s1").child("a1", "a2", "a2_1", "a2_1_1"));
}
use of com.enonic.xp.node.ResolveSyncWorkResult in project xp by enonic.
the class ResolveSyncWorkCommandTest method exclude_itself.
/*
- S1
- A1
- A2
- A2_1 - Ref:B2_1
- S2
- B1
- B2
- B2_1
- S1d (New)
- A1d
- A2d
- A2_1 - Ref:B2_1
*/
@Test
public void exclude_itself() {
createS1S2Tree();
refresh();
ResolveSyncWorkResult result = resolveSyncWorkResult(NodeId.from("s1"), NodeIds.from("s1"), true);
assertNodes(result, ExpectedNodes.create().child("a1", "a2", "a2_1", "a2_1_1").referred("b2_1").parent("b2", "s2", "s1"));
result = resolveSyncWorkResult(NodeId.from("s1"), NodeIds.from("s1"), false);
assertNodes(result, ExpectedNodes.create());
}
Aggregations