// Path: api/src/main/java/javax/observer/Property.java
// public interface Property<V> extends Observable<V> {
// 
//     /**
//      * Replaces the internal value with the given new value. This should end in calling the
//      * {@link ValueChangeListener#valueChanged(ValueChangeEvent)} method on all registered
//      * listeners.
//      * @param value the new value
//      */
//     void setValue(V value);
// }
// 
// Path: api/src/main/java/javax/observer/Subscription.java
// @FunctionalInterface
// public interface Subscription {
// 
//     void unsubscribe();
// }


import javax.observer.Property;
import javax.observer.Subscription;
import java.util.Objects;

package javax.observer.tck;


/**
 * Created by hendrikebbers on 11.11.16.
 */
public class CheckBooleanProperty {

    public static void checkBooleanPropertyBasicMethods(final Property<Boolean> property) {
        Objects.requireNonNull(property);
        property.getValue();
        property.value();
        property.value().orElse(true);
        property.setValue(Boolean.FALSE);
        property.setValue(Boolean.TRUE);

// Path: api/src/main/java/javax/observer/Property.java
// public interface Property<V> extends Observable<V> {
// 
//     /**
//      * Replaces the internal value with the given new value. This should end in calling the
//      * {@link ValueChangeListener#valueChanged(ValueChangeEvent)} method on all registered
//      * listeners.
//      * @param value the new value
//      */
//     void setValue(V value);
// }
// 
// Path: api/src/main/java/javax/observer/Subscription.java
// @FunctionalInterface
// public interface Subscription {
// 
//     void unsubscribe();
// }


// Path: tck/src/main/java/javax/observer/tck/CheckBooleanProperty.java
import javax.observer.Property;
import javax.observer.Subscription;
import java.util.Objects;

package javax.observer.tck;


/**
 * Created by hendrikebbers on 11.11.16.
 */
public class CheckBooleanProperty {

    public static void checkBooleanPropertyBasicMethods(final Property<Boolean> property) {
        Objects.requireNonNull(property);
        property.getValue();
        property.value();
        property.value().orElse(true);
        property.setValue(Boolean.FALSE);
        property.setValue(Boolean.TRUE);

        final Subscription subscription = property.onChanged(e -> new RuntimeException("FAIL"));
