// Path: api/src/test/java/de/tesis/dynaware/grapheditor/utils/FXTestUtils.java
// public static void dragBy(final Node node, final double dx, final double dy) {
//     dragTo(node, node.getLayoutX() + dx, node.getLayoutY() + dy);
// }
// 
// Path: api/src/test/java/de/tesis/dynaware/grapheditor/utils/FXTestUtils.java
// public static void dragTo(final Node node, final double endX, final double endY) {
//     dragTo(node, 0, 0, endX, endY);
// }
// 
// Path: api/src/test/java/de/tesis/dynaware/grapheditor/utils/FXTestUtils.java
// public static void forceLayoutUpdate(final Parent parent) {
//     parent.autosize();
//     parent.snapshot(null, null);
//     parent.layout();
// }
// 
// Path: api/src/main/java/de/tesis/dynaware/grapheditor/EditorElement.java
// public enum EditorElement
// {
//     CONNECTOR,
//     NODE,
//     JOINT;
// }


import static de.tesis.dynaware.grapheditor.utils.FXTestUtils.dragBy;
import static de.tesis.dynaware.grapheditor.utils.FXTestUtils.dragTo;
import static de.tesis.dynaware.grapheditor.utils.FXTestUtils.forceLayoutUpdate;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Test;
import de.tesis.dynaware.grapheditor.EditorElement;
import javafx.scene.layout.Pane;

/*
 * Copyright (C) 2005 - 2014 by TESIS DYNAware GmbH
 */
package de.tesis.dynaware.grapheditor.utils;




public class DraggableBoxTest {

    @ClassRule
    public static JavaFXThreadingRule javaFXThreadingRule = new JavaFXThreadingRule();

    private static final double BOX_WIDTH = 80;
    private static final double BOX_HEIGHT = 50;
    private static final double BOX_INITIAL_X = 48;
    private static final double BOX_INITIAL_Y = 39;

    private static final double BOUNDARY_INDENT = 12;
    private static final double GRID_SPACING = 11;
    private static final double ALIGNMENT_THRESHOLD = 16;


// Path: api/src/test/java/de/tesis/dynaware/grapheditor/utils/FXTestUtils.java
// public static void dragBy(final Node node, final double dx, final double dy) {
//     dragTo(node, node.getLayoutX() + dx, node.getLayoutY() + dy);
// }
// 
// Path: api/src/test/java/de/tesis/dynaware/grapheditor/utils/FXTestUtils.java
// public static void dragTo(final Node node, final double endX, final double endY) {
//     dragTo(node, 0, 0, endX, endY);
// }
// 
// Path: api/src/test/java/de/tesis/dynaware/grapheditor/utils/FXTestUtils.java
// public static void forceLayoutUpdate(final Parent parent) {
//     parent.autosize();
//     parent.snapshot(null, null);
//     parent.layout();
// }
// 
// Path: api/src/main/java/de/tesis/dynaware/grapheditor/EditorElement.java
// public enum EditorElement
// {
//     CONNECTOR,
//     NODE,
//     JOINT;
// }


// Path: api/src/test/java/de/tesis/dynaware/grapheditor/utils/DraggableBoxTest.java
import static de.tesis.dynaware.grapheditor.utils.FXTestUtils.dragBy;
import static de.tesis.dynaware.grapheditor.utils.FXTestUtils.dragTo;
import static de.tesis.dynaware.grapheditor.utils.FXTestUtils.forceLayoutUpdate;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Test;
import de.tesis.dynaware.grapheditor.EditorElement;
import javafx.scene.layout.Pane;

/*
 * Copyright (C) 2005 - 2014 by TESIS DYNAware GmbH
 */
package de.tesis.dynaware.grapheditor.utils;




public class DraggableBoxTest {

    @ClassRule
    public static JavaFXThreadingRule javaFXThreadingRule = new JavaFXThreadingRule();

    private static final double BOX_WIDTH = 80;
    private static final double BOX_HEIGHT = 50;
    private static final double BOX_INITIAL_X = 48;
    private static final double BOX_INITIAL_Y = 39;

    private static final double BOUNDARY_INDENT = 12;
    private static final double GRID_SPACING = 11;
    private static final double ALIGNMENT_THRESHOLD = 16;


    private final DraggableBox box = new DraggableBox(EditorElement.NODE);
