Closed vshcherb closed 1 week ago
Create unit test for this case
public static void main(String[] args) { List<ButtonPositionSize> lst = defaultLayoutExample(); for (ButtonPositionSize b : lst) { System.out.println(b); } System.out.println("--------"); ButtonPositionSize.computeNonOverlap(0, lst); for (ButtonPositionSize b : lst) { System.out.println(b); } } public static List<ButtonPositionSize> defaultLayoutExample() { List<ButtonPositionSize> lst = new ArrayList<ButtonPositionSize>(); lst.add(new ButtonPositionSize("topPanel", 7, ButtonPositionSize.POS_FULL_WIDTH, ButtonPositionSize.POS_TOP). setMoveDescendantsVertical()); lst.add(new ButtonPositionSize("leftWid", 7, ButtonPositionSize.POS_LEFT, ButtonPositionSize.POS_TOP). setMoveDescendantsVertical().setSize(10, 10)); lst.add(new ButtonPositionSize("zoomOut", 7, false, false).setMoveVertical()); lst.add(new ButtonPositionSize("zoomIn", 7, false, false).setMoveVertical()); lst.add(new ButtonPositionSize("myLoc", 7, false, false).setMoveHorizontal()); lst.add(new ButtonPositionSize("drawer", 7, true, false).setMoveHorizontal()); lst.add(new ButtonPositionSize("navigation", 7, true, false).setMoveHorizontal()); lst.add(new ButtonPositionSize("ruler", 10, true, false).setMoveHorizontal()); lst.add(new ButtonPositionSize("configMap", 6, true, true).setMoveHorizontal()); lst.add(new ButtonPositionSize("search", 6, true, true).setMoveHorizontal()); lst.add(new ButtonPositionSize("compass", 6, true, true).setMoveVertical()); return lst; }
Create unit test for this case