All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eu.lestard.assertj.javafx.api.ReadOnlyStringPropertyAssert Maven / Gradle / Ivy

The newest version!
package eu.lestard.assertj.javafx.api;

import eu.lestard.assertj.javafx.internal.ObservableStringValueAssertions;
import eu.lestard.assertj.javafx.internal.ObservableValueAssertions;
import javafx.beans.property.ReadOnlyStringProperty;
import javafx.beans.value.ObservableStringValue;
import org.assertj.core.api.AbstractAssert;

/**
 * Assertion methods for {@link ReadOnlyStringProperty}s.
 *
 * 

To create an instance of this class, invoke * {@link eu.lestard.assertj.javafx.api.Assertions#assertThat(ReadOnlyStringProperty)}. *

* * @author manuel mauky */ public class ReadOnlyStringPropertyAssert extends AbstractAssert { protected ReadOnlyStringPropertyAssert(ReadOnlyStringProperty actual) { super(actual, ReadOnlyStringPropertyAssert.class); } /** * Verifies that the actual observable has the expected value set. * * @param expectedValue the value to compare to the actual observables current value. * @return {@code this} assertion instance. */ public ReadOnlyStringPropertyAssert hasValue(String expectedValue) { new ObservableStringValueAssertions(actual).hasValue(expectedValue); return this; } /** * Verifies that the actual observable has a value of null. * * @return {@code this} assertion instance. */ public ReadOnlyStringPropertyAssert hasNullValue() { new ObservableValueAssertions<>(actual).hasNullValue(); return this; } /** * Verifies that the actual observable has NOT a value of null. * * @return {@code this} assertion instance. */ public ReadOnlyStringPropertyAssert hasNotNullValue() { new ObservableValueAssertions<>(actual).hasNotNullValue(); return this; } /** * Verifies that the actual observable has the same value as the given observable. * * @param expectedValue the observable value to compare with the actual observables current value. * * @return {@code this} assertion instance. */ public ReadOnlyStringPropertyAssert hasSameValue(ObservableStringValue expectedValue) { new ObservableValueAssertions<>(actual).hasSameValue(expectedValue); return this; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy