Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manuel-mauky/assertj-javafx
AssertJ assertions for JavaFX
https://github.com/manuel-mauky/assertj-javafx
assertj assertj-assertions javafx
Last synced: 2 months ago
JSON representation
AssertJ assertions for JavaFX
- Host: GitHub
- URL: https://github.com/manuel-mauky/assertj-javafx
- Owner: manuel-mauky
- License: apache-2.0
- Created: 2014-04-14T21:28:31.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-16T18:31:49.000Z (over 9 years ago)
- Last Synced: 2024-05-18T21:35:08.015Z (7 months ago)
- Topics: assertj, assertj-assertions, javafx
- Language: Java
- Homepage:
- Size: 727 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- AwesomeJavaFX - assertj-javafx - AssertJ assertions for JavaFX Properties and Bindings. (Libraries, Tools and Projects)
README
# AssertJ Assertions for JavaFX
[![Build Status](https://travis-ci.org/lestard/assertj-javafx.svg?branch=master)](https://travis-ci.org/lestard/assertj-javafx)
The goal of this project is to create AssertJ assertions for JavaFX (8).
## Example
```java
import javafx.beans.binding.Bindings;
import javafx.beans.binding.DoubleBinding;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.SimpleDoubleProperty;
import org.junit.Test;import static eu.lestard.assertj.javafx.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.offset;public class RadiusExample {
@Test
public void testCircleArea(){DoubleProperty radius = new SimpleDoubleProperty();
DoubleBinding radiusSquared = radius.multiply(radius);DoubleBinding circleArea = Bindings.multiply(Math.PI, radiusSquared);
radius.set(5);
assertThat(circleArea).hasValue(78.53, offset(0.01));radius.set(12);
assertThat(circleArea).hasValue(452.4, offset(0.1));
}
}```
## How to Use
Gradle:
```groovy
dependencies {
testCompile 'eu.lestard:assertj-javafx:0.3.0'
}
```Maven:
```xmleu.lestard
assertj-javafx
0.3.0
test```
## Use the current development version
Snapshots of the current development version are available in the Sonatype OSS Snapshot repository.
They are created and deployed automatically by the Travis-CI on every commit.Gradle:
```groovy
// add the sonatype snapshot repository
repositories {
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}dependencies {
testCompile 'eu.lestard:assertj-javafx:0.4.0-SNAPSHOT'
}```
## Links
[JavaDoc](https://lestard.github.io/assertj-javafx/javadoc/0.3.0/)