use of org.uberfire.ext.wires.core.grids.client.model.Bounds in project drools-wb by kiegroup.
the class GuidedDecisionTableModellerBoundsHelperTest method multipleDecisionTablesCheckLeftBounds.
@Test
public void multipleDecisionTablesCheckLeftBounds() {
final Bounds b = helper.getBounds(new HashSet<GuidedDecisionTableView.Presenter>() {
{
add(makeTable(0, 0, 400, 400));
add(makeTable(-2200, 0, 400, 400));
}
});
final double expectedMinX = -2200 - BOUNDS_PADDING;
assertEquals(expectedMinX, b.getX(), 0.0);
assertEquals(BOUNDS_MIN_Y, b.getY(), 0.0);
assertEquals(BOUNDS_MAX_X - expectedMinX, b.getWidth(), 0.0);
assertEquals(BOUNDS_MAX_Y - BOUNDS_MIN_Y, b.getHeight(), 0.0);
}
use of org.uberfire.ext.wires.core.grids.client.model.Bounds in project drools-wb by kiegroup.
the class GuidedDecisionTableModellerBoundsHelperTest method multipleDecisionTablesCheckRightBounds.
@Test
public void multipleDecisionTablesCheckRightBounds() {
final Bounds b = helper.getBounds(new HashSet<GuidedDecisionTableView.Presenter>() {
{
add(makeTable(0, 0, 400, 400));
add(makeTable(1800, 0, 400, 400));
}
});
final double expectedMaxX = 1800 + 400 + BOUNDS_PADDING;
assertEquals(BOUNDS_MIN_X, b.getX(), 0.0);
assertEquals(BOUNDS_MIN_Y, b.getY(), 0.0);
assertEquals(expectedMaxX - BOUNDS_MIN_X, b.getWidth(), 0.0);
assertEquals(BOUNDS_MAX_Y - BOUNDS_MIN_Y, b.getHeight(), 0.0);
}
use of org.uberfire.ext.wires.core.grids.client.model.Bounds in project drools-wb by kiegroup.
the class GuidedDecisionTableModellerBoundsHelperTest method emptyOneDecisionTableWithinMinimumBounds.
@Test
public void emptyOneDecisionTableWithinMinimumBounds() {
final Bounds b = helper.getBounds(new HashSet<GuidedDecisionTableView.Presenter>() {
{
add(makeTable(0, 0, 400, 400));
}
});
assertEquals(BOUNDS_MIN_X, b.getX(), 0.0);
assertEquals(BOUNDS_MIN_Y, b.getY(), 0.0);
assertEquals(BOUNDS_MAX_X - BOUNDS_MIN_X, b.getWidth(), 0.0);
assertEquals(BOUNDS_MAX_Y - BOUNDS_MIN_Y, b.getHeight(), 0.0);
}
use of org.uberfire.ext.wires.core.grids.client.model.Bounds in project drools-wb by kiegroup.
the class GuidedDecisionTableModellerBoundsHelperTest method multipleDecisionTablesCheckTopBounds.
@Test
public void multipleDecisionTablesCheckTopBounds() {
final Bounds b = helper.getBounds(new HashSet<GuidedDecisionTableView.Presenter>() {
{
add(makeTable(0, 0, 400, 400));
add(makeTable(0, -2200, 400, 400));
}
});
final double expectedMinY = -2200 - BOUNDS_PADDING;
assertEquals(BOUNDS_MIN_X, b.getX(), 0.0);
assertEquals(expectedMinY, b.getY(), 0.0);
assertEquals(BOUNDS_MAX_X - BOUNDS_MIN_X, b.getWidth(), 0.0);
assertEquals(BOUNDS_MAX_Y - expectedMinY, b.getHeight(), 0.0);
}
Aggregations