diff options
author | Aleksi Hietanen <aleksi@vaadin.com> | 2017-11-21 14:25:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-21 14:25:42 +0200 |
commit | f805482c6013cebdb401341da37614fd664f85c7 (patch) | |
tree | d5f04537f28513a4fbab86e2655eaa4e7a05b444 /server/src/test | |
parent | 0fbeb0a6261b5a9f6485928965f0932fea0e624f (diff) | |
download | vaadin-framework-f805482c6013cebdb401341da37614fd664f85c7.tar.gz vaadin-framework-f805482c6013cebdb401341da37614fd664f85c7.zip |
Fix issues from API review for 8.2 (#10342)
* Rename HierarchicalDataCommunicator#getMapper to getHierarchyMapper
* Make rpc field in Notification private
* Change DropIndexCalculator.ALWAYS_DROP_TO_END to a generic static method
* Move EditorImpl#editRow documentation to the interface level
* Correct GridDragEndEvent, GridDragStartEvent constructor javadocs
* Revert SharedState.registeredEventListeners to a Set
* Rename GridDropTarget dropAllowedOnSortedGridRows
* Rename ColumnState.contentMode to tooltipContentMode
Diffstat (limited to 'server/src/test')
3 files changed, 19 insertions, 19 deletions
diff --git a/server/src/test/java/com/vaadin/tests/components/grid/GridDropTargetTest.java b/server/src/test/java/com/vaadin/tests/components/grid/GridDropTargetTest.java index d5de0ad808..cc5b31de0f 100644 --- a/server/src/test/java/com/vaadin/tests/components/grid/GridDropTargetTest.java +++ b/server/src/test/java/com/vaadin/tests/components/grid/GridDropTargetTest.java @@ -24,14 +24,14 @@ public class GridDropTargetTest { @Test public void dropAllowedOnSortedGridRows_defaultValue_isTrue() { Assert.assertTrue("Default drop allowed should be backwards compatible", - target.isDropAllowedOnSortedGridRows()); + target.isDropAllowedOnRowsWhenSorted()); } @Test public void dropAllowedOnSortedGridRows_notAllowed_changesDropModeWhenSorted() { Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); - target.setDropAllowedOnSortedGridRows(false); + target.setDropAllowedOnRowsWhenSorted(false); Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); @@ -64,11 +64,11 @@ public class GridDropTargetTest { Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); - target.setDropAllowedOnSortedGridRows(false); + target.setDropAllowedOnRowsWhenSorted(false); Assert.assertEquals(DropMode.ON_GRID, target.getDropMode()); - target.setDropAllowedOnSortedGridRows(true); + target.setDropAllowedOnRowsWhenSorted(true); Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); } @@ -77,7 +77,7 @@ public class GridDropTargetTest { public void dropAllowedOnSortedGridRows_notAllowedBackToAllowed_changesBackToUserDefinedMode() { Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); - target.setDropAllowedOnSortedGridRows(false); + target.setDropAllowedOnRowsWhenSorted(false); Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); @@ -85,7 +85,7 @@ public class GridDropTargetTest { Assert.assertEquals(DropMode.ON_GRID, target.getDropMode()); - target.setDropAllowedOnSortedGridRows(true); + target.setDropAllowedOnRowsWhenSorted(true); Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); @@ -98,19 +98,19 @@ public class GridDropTargetTest { public void dropAllowedOnSortedGridRows_swappingAllowedDropOnSortedOffAndOn() { Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); - target.setDropAllowedOnSortedGridRows(false); + target.setDropAllowedOnRowsWhenSorted(false); Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); - target.setDropAllowedOnSortedGridRows(false); + target.setDropAllowedOnRowsWhenSorted(false); Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); - target.setDropAllowedOnSortedGridRows(true); + target.setDropAllowedOnRowsWhenSorted(true); Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); - target.setDropAllowedOnSortedGridRows(true); + target.setDropAllowedOnRowsWhenSorted(true); Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); } @@ -119,7 +119,7 @@ public class GridDropTargetTest { public void dropAllowedOnSortedGridRows_changingDropModeWhileSorted_replacesPreviouslyCachedButDoesntOverride() { Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); - target.setDropAllowedOnSortedGridRows(false); + target.setDropAllowedOnRowsWhenSorted(false); Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); @@ -131,7 +131,7 @@ public class GridDropTargetTest { Assert.assertEquals(DropMode.ON_GRID, target.getDropMode()); Assert.assertFalse("Changing drop mode should not have any effect here", - target.isDropAllowedOnSortedGridRows()); + target.isDropAllowedOnRowsWhenSorted()); grid.clearSortOrder(); @@ -145,7 +145,7 @@ public class GridDropTargetTest { Assert.assertEquals(DropMode.ON_GRID, target.getDropMode()); - target.setDropAllowedOnSortedGridRows(true); + target.setDropAllowedOnRowsWhenSorted(true); Assert.assertEquals(DropMode.ON_TOP_OR_BETWEEN, target.getDropMode()); } diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/GridRowDraggerOneGridTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/GridRowDraggerOneGridTest.java index 9888f42807..08b647cdde 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/grid/GridRowDraggerOneGridTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/grid/GridRowDraggerOneGridTest.java @@ -15,8 +15,8 @@ import com.vaadin.data.provider.ListDataProvider; import com.vaadin.shared.ui.grid.DropLocation; import com.vaadin.ui.Grid; import com.vaadin.ui.components.grid.DropIndexCalculator; -import com.vaadin.ui.components.grid.GridRowDragger; import com.vaadin.ui.components.grid.GridDropEvent; +import com.vaadin.ui.components.grid.GridRowDragger; import com.vaadin.ui.components.grid.SourceDataProviderUpdater; public class GridRowDraggerOneGridTest { @@ -143,7 +143,7 @@ public class GridRowDraggerOneGridTest { public void alwaysDropToEndCalculator() { source.setItems("0", "1", "2"); - dragger.setDropIndexCalculator(DropIndexCalculator.ALWAYS_DROP_TO_END); + dragger.setDropIndexCalculator(DropIndexCalculator.alwaysDropToEnd()); drop("1", DropLocation.ABOVE, "0"); @@ -208,7 +208,7 @@ public class GridRowDraggerOneGridTest { public void dropOnSortedGrid_byDefault_dropsToTheEnd() { Assert.assertFalse( "Default drops on sorted grid rows should not be allowed", - dragger.getGridDropTarget().isDropAllowedOnSortedGridRows()); + dragger.getGridDropTarget().isDropAllowedOnRowsWhenSorted()); source.setItems("0", "1", "2", "3", "4"); diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/GridRowDraggerTwoGridsTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/GridRowDraggerTwoGridsTest.java index 127365be36..6401867e3b 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/grid/GridRowDraggerTwoGridsTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/grid/GridRowDraggerTwoGridsTest.java @@ -15,8 +15,8 @@ import com.vaadin.data.provider.ListDataProvider; import com.vaadin.shared.ui.grid.DropLocation; import com.vaadin.ui.Grid; import com.vaadin.ui.components.grid.DropIndexCalculator; -import com.vaadin.ui.components.grid.GridRowDragger; import com.vaadin.ui.components.grid.GridDropEvent; +import com.vaadin.ui.components.grid.GridRowDragger; import com.vaadin.ui.components.grid.SourceDataProviderUpdater; public class GridRowDraggerTwoGridsTest { @@ -186,7 +186,7 @@ public class GridRowDraggerTwoGridsTest { source.setItems("0"); target.setItems("1", "2"); - dragger.setDropIndexCalculator(DropIndexCalculator.ALWAYS_DROP_TO_END); + dragger.setDropIndexCalculator(DropIndexCalculator.alwaysDropToEnd()); drop("1", DropLocation.ABOVE, "0"); @@ -255,7 +255,7 @@ public class GridRowDraggerTwoGridsTest { public void dropOnSortedGrid_byDefault_dropsToTheEnd() { Assert.assertFalse( "Default drops on sorted grid rows should not be allowed", - dragger.getGridDropTarget().isDropAllowedOnSortedGridRows()); + dragger.getGridDropTarget().isDropAllowedOnRowsWhenSorted()); source.setItems("0", "1", "2"); target.setItems("4", "5"); |