Search in sources :

Example 1 with ObservableSet

use of io.requery.util.ObservableSet in project requery by requery.

the class ObservableCollectionTest method observableCollections.

@Parameterized.Parameters
public static <T extends Collection<Phone> & ObservableCollection<Phone>> Collection<T> observableCollections() {
    Person person = new Person();
    // ObservableList
    List<Phone> observableList = person.getPhoneNumbersList();
    assertTrue(observableList instanceof ObservableList);
    // ObservableSet
    Set<Phone> observableSet = person.getPhoneNumbersSet();
    assertTrue(observableSet instanceof ObservableSet);
    return Arrays.asList((T) observableList, (T) observableSet);
}
Also used : ObservableList(io.requery.util.ObservableList) Phone(io.requery.test.model.Phone) Person(io.requery.test.model.Person) ObservableSet(io.requery.util.ObservableSet)

Aggregations

Person (io.requery.test.model.Person)1 Phone (io.requery.test.model.Phone)1 ObservableList (io.requery.util.ObservableList)1 ObservableSet (io.requery.util.ObservableSet)1