// 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);
Integer width = Expectations.get(225, new IntValue[]{new IntValue("flanker-desktop", 221)});
assertThat(text.getModelBounds()).isEqualTo(new Rectangle(-3, 111, width, 22));
}
{
// button
AbstractComponentInfo button = children.get(3);
assertThat(button).isInstanceOf(CanvasInfo.class);
Integer x = Expectations.get(77, new IntValue[]{new IntValue("flanker-desktop", 76)});
Integer y = Expectations.get(136, new IntValue[]{new IntValue("flanker-desktop", 137)});
Integer width = Expectations.get(71, new IntValue[]{new IntValue("flanker-desktop", 70)});
assertThat(button.getModelBounds()).isEqualTo(
new Rectangle(x, y, width, CanvasTest.BUTTON_HEIGHT));
}
{
// fill
AbstractComponentInfo fill = children.get(4);
assertThat(fill).isInstanceOf(ToolStripCanvasInfo.class);
Integer x = Expectations.get(14, new IntValue[]{new IntValue("flanker-desktop", 12)});
assertThat(fill.getModelBounds()).isEqualTo(new Rectangle(x, 159, 198, 40));
}
}