use of com.ait.tooling.nativetools.client.collection.NFastArrayList in project kie-wb-common by kiegroup.
the class CaseManagementContainmentControlTest method setup.
@Before
public void setup() {
layer = spy(new Layer());
shape = spy(new MockCaseManagementShape());
final Group shapeGroup = mock(Group.class);
when(shapeGroup.getLayer()).thenReturn(layer);
when(shape.getGroup()).thenReturn(shapeGroup);
when(shape.getWiresManager()).thenReturn(wiresManager);
when(shape.getGhost()).thenReturn(ghost);
when(wiresManager.getContainmentAcceptor()).thenReturn(containmentAcceptor);
when(parentPickerControl.getPickerOptions()).thenReturn(PICKER_OPTIONS);
when(parentPickerControl.getShapeLocationControl()).thenReturn(shapeLocationControl);
when(containmentControl.getParentPickerControl()).thenReturn(parentPickerControl);
when(containmentControl.getShape()).thenReturn(shape);
when(containmentControl.getParent()).thenReturn(parent);
final NFastArrayList<WiresShape> children = new NFastArrayList<>();
children.add(shape);
children.add(ghost);
when(parent.getChildShapes()).thenReturn(children);
when(parent.getLayoutHandler()).thenReturn(parentLayoutHandler);
when(parent.getIndex(eq(shape))).thenReturn(0);
when(parent.getGroup()).thenReturn(new Group());
when(state.getGhost()).thenReturn(Optional.of(ghost));
when(state.getOriginalParent()).thenReturn(Optional.of(parent));
when(state.getOriginalIndex()).thenReturn(Optional.of(0));
control = new CaseManagementContainmentControl(containmentControl, state);
}
Aggregations