use of java.util.Observer in project j2objc by google.
the class ObservableTest method test_observableWithOverridenHasChanged.
// http://b/28797950
public void test_observableWithOverridenHasChanged() throws Exception {
final AtomicReference<Observable> updated = new AtomicReference<>();
final Observer observer = (observable1, data) -> updated.set(observable1);
Observable alwaysChanging = new AlwaysChangedObservable();
alwaysChanging.addObserver(observer);
alwaysChanging.notifyObservers(null);
assertSame(alwaysChanging, updated.get());
}
Aggregations