modules/base/src/test/java/test/javafx/collections/SortedListTest.java
Print this page
rev 9235 : 8134760: Refactor Javafx base module tests for clear separation of tests
Reviewed-by:
@@ -21,12 +21,14 @@
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
-package javafx.collections;
+package test.javafx.collections;
+import test.javafx.collections.Person;
+import test.javafx.collections.MockListObserver;
import com.sun.javafx.collections.NonIterableChange.SimplePermutationChange;
import com.sun.javafx.collections.ObservableListWrapper;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -35,10 +37,14 @@
import java.util.Comparator;
import java.util.Map;
import javafx.beans.Observable;
import javafx.beans.property.SimpleObjectProperty;
+import javafx.collections.FXCollections;
+import javafx.collections.ListChangeListener;
+import javafx.collections.ObservableList;
+import javafx.collections.ObservableListWrapperShim;
import javafx.collections.transformation.SortedList;
import javafx.collections.transformation.TransformationList;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.* ;
@@ -296,11 +302,12 @@
public void swap() {
E first = get(0);
backingList.set(0, get(size() - 1));
backingList.set(size() -1, first);
- fireChange(new SimplePermutationChange(0, size(), new int[] {2, 1, 0}, this));
+ ObservableListWrapperShim.fireChange(this,
+ new SimplePermutationChange(0, size(), new int[] {2, 1, 0}, this));
}
}
/**
* SortedList cant cope with permutations.