" canvas.draw();",
" }",
"}"});
canvas.refresh();
// check ToolStrip
ToolStripInfo toolStrip = canvas.getChildren(ToolStripInfo.class).get(0);
assertThat(toolStrip.isHorizontal()).isFalse();
// check children
assertThat(toolStrip.getChildrenReal().size()).isEqualTo(4);
assertThat(toolStrip.getCanvases().length).isEqualTo(4);
List<AbstractComponentInfo> children = toolStrip.getChildren(AbstractComponentInfo.class);
assertThat(children.size()).isEqualTo(5);
// check bounds
{
// label
AbstractComponentInfo label = children.get(0);
assertThat(label).isInstanceOf(CanvasInfo.class);
Integer x = Expectations.get(13, new IntValue[]{new IntValue("flanker-desktop", 12)});
Integer y = Expectations.get(0, new IntValue[]{new IntValue("flanker-desktop", 1)});
assertThat(label.getModelBounds()).isEqualTo(new Rectangle(x, y, 198, 100));
}
{
// resizer
AbstractComponentInfo resizer = children.get(1);
assertThat(resizer).isInstanceOf(ToolStripResizerInfo.class);
Integer y = Expectations.get(100, new IntValue[]{new IntValue("flanker-desktop", 101)});
assertThat(resizer.getModelBounds()).isEqualTo(
new Rectangle(0, y, toolStrip.getModelBounds().width, ToolStripResizerInfo.DEFAULT_SIZE));
}
{
// text item
AbstractComponentInfo text = children.get(2);
assertThat(text).isInstanceOf(FormItemInfo.class);