src/test/java/net/christophermerrill/FancyFxTree/FancyTreeTests.java
@Test
	public void moveMultipleByDragInto()
		{
		createBasicTreeAndData();

		ExampleDataNode target1 = _model.getNodeByName("1.1.1");
		ExampleDataNode target2 = _model.getNodeByName("1.1.2");
		ExampleDataNode destination = _model.getNodeByName("1.2.1");

		clickOn(target1.getName());
		press(SHIFT).clickOn(target2.getName()).release(SHIFT);
		drag(target2.getName(), MouseButton.PRIMARY);
		dropTo(destination.getName());
		waitForUiEvents();

		Assertions.assertEquals(2, _operations_handler._drag_count, "2 items should be dragged");
		Assertions.assertTrue(dropListContains(_operations_handler._dropped_nodes, target1), "first item was not dropped");
		Assertions.assertTrue(dropListContains(_operations_handler._dropped_nodes, target2), "second item was not dropped");

		Assertions.assertTrue(destination.contains(target1));
		Assertions.assertTrue(destination.contains(target2));
		}
/**
	 * This test passes in isolation but fails when run after certain tests.
	 * Diagnosis reveals that the drag handler (FancyTreeCell) never gets called.
	 * Unable to determine cause.
	 */
This test passes in isolation but fails when run after certain tests.
Diagnosis reveals that the drag handler (FancyTreeCell) never gets called.
Unable to determine cause.
This test passes in isolation but fails when run after certain tests . Diagnosis reveals that the drag handler ( FancyTreeCell ) never gets called . Unable to determine cause .
@Test
	public void moveMultipleByDragInto()
		{
		createBasicTreeAndData();
		ExampleDataNode target1 = _model.getNodeByName("1.1.1");
		ExampleDataNode target2 = _model.getNodeByName("1.1.2");
		ExampleDataNode destination = _model.getNodeByName("1.2.1");
		clickOn(target1.getName());
		press(SHIFT).clickOn(target2.getName()).release(SHIFT);
		drag(target2.getName(), MouseButton.PRIMARY);
		dropTo(destination.getName());
		waitForUiEvents();
		Assertions.assertEquals(2, _operations_handler._drag_count, "2 items should be dragged");
		Assertions.assertTrue(dropListContains(_operations_handler._dropped_nodes, target1), "first item was not dropped");
		Assertions.assertTrue(dropListContains(_operations_handler._dropped_nodes, target2), "second item was not dropped");
		Assertions.assertTrue(destination.contains(target1));
		Assertions.assertTrue(destination.contains(target2));
		}
@ Test public void moveMultipleByDragInto ( ) { createBasicTreeAndData ( ) ; ExampleDataNode target1 = _model . getNodeByName ( "1.1.1" ) ; ExampleDataNode target2 = _model . getNodeByName ( "1.1.2" ) ; ExampleDataNode destination = _model . getNodeByName ( "1.2.1" ) ; clickOn ( target1 . getName ( ) ) ; press ( SHIFT ) . clickOn ( target2 . getName ( ) ) . release ( SHIFT ) ; drag ( target2 . getName ( ) , MouseButton . PRIMARY ) ; dropTo ( destination . getName ( ) ) ; waitForUiEvents ( ) ; Assertions . assertEquals ( 2 , _operations_handler . _drag_count , "2 items should be dragged" ) ; Assertions . assertTrue ( dropListContains ( _operations_handler . _dropped_nodes , target1 ) , "first item was not dropped" ) ; Assertions . assertTrue ( dropListContains ( _operations_handler . _dropped_nodes , target2 ) , "second item was not dropped" ) ; Assertions . assertTrue ( destination . contains ( target1 ) ) ; Assertions . assertTrue ( destination . contains ( target2 ) ) ; }
This test passes in isolation but fails when run after certain tests.
This test passes in isolation but fails when run after certain tests .