The goal of this project is to create AssertJ assertions for JavaFX (8).

Overview

AssertJ Assertions for JavaFX

Build Status

The goal of this project is to create AssertJ assertions for JavaFX (8).

Example

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:

dependencies {
    testCompile 'eu.lestard:assertj-javafx:0.3.0'
}

Maven:

<dependency>
    <groupId>eu.lestardgroupId>
    <artifactId>assertj-javafxartifactId>
    <version>0.3.0version>
    <scope>testscope>
dependency>

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:

// 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

You might also like...

An Android library that allows you to easily create applications with slide-in menus.

An Android library that allows you to easily create applications with slide-in menus. You may use it in your Android apps provided that you cite this project and include the license in your app. Thanks!

Jan 4, 2023

Nightmare-text - This is a simple lib that help to create, titles, actionbars, hovers and click actions chat components.

Nightmare text This is a simple lib that help to create, titles, actionbars, hovers and click actions chat components. Setup public final class Testin

Mar 9, 2022

Collection of Binding helpers for JavaFX(8)

Advanced-Bindings for JavaFX (8) advanced-bindings is a collection of useful helpers and custom binding implementations to simplify the development of

Nov 19, 2022

Docking framework for JavaFX platform

Docking framework for JavaFX platform

Docking framework for JavaFX platform AnchorFX is a gratis and open source library for JavaFX to create graphical interfaces with docking features Anc

Oct 15, 2022

A library of +70 ready-to-use animations for JavaFX

AnimateFX A library of ready-to-use animations for JavaFX Features: Custom animations Custom interpolators Play/Stop animation Play an animation after

Jan 5, 2023

BootstrapFX: Bootstrap for JavaFX

BootstrapFX: Bootstrap for JavaFX

BootstrapFX BootstrapFX is a partial port of Twitter Bootstrap for JavaFX. It mainly provides a CSS stylesheet that closely resembles the original whi

Dec 28, 2022

A Java framework for creating sophisticated calendar views (JavaFX 8, 9, 10, and 11)

A Java framework for creating sophisticated calendar views (JavaFX 8, 9, 10, and 11)

CalendarFX A Java framework for creating sophisticated calendar views based on JavaFX. A detailed developer manual can be found online: CalendarFX 8 D

Jan 6, 2023

Allow runtime modification of JavaFX CSS

Allow runtime modification of JavaFX CSS

cssfx ⚠ WARNING ⚠ In version 11.3.0 we have relocated & refactored the project. maven groupId has been changed to fr.brouillard.oss java module name h

Jan 2, 2023

MDI components for JavaFX

MDI components for JavaFX

DesktopPaneFX DesktopPaneFX is a JavaFX version of Swing’s JDesktopPane which can be used as a container for individual "child" similar to JInternalFr

Sep 23, 2022
Comments
  • Node assertions?

    Node assertions?

    It would be nice to be able to do things like:

    NodeAssert.assertThat(find("#startMachineButton")).isDisabled();
    NodeAssert.assertThat(find("#statusText")).isText().hasText("Machine stopped");
    NodeAssert.assertThat(find("#startMachineButton")).isButton().hasText("Start");
    

    (Note that the find method is a little helper method in my TestFX bases abstract base class I use in my UI tests to find a Node)

    Are there any plans to provide node assertions?

    opened by wimdeblauwe 3
Releases(v0.3.0)
Owner
Manuel Mauky
Manuel Mauky
A project that shows the different ways on how to create custom controls in JavaFX

JavaFX Custom Controls This project will show different ways on how to create custom controls in JavaFX. It will cover the following approaches: Resty

Gerrit Grunwald 27 Sep 5, 2022
Old and archived; More recent development is in https://github.com/Create-Fabric/Create-Refabricated.

NOW ARCHIVED Go here for the continuation of this project. Old README Create Fabric A Fabric port of Create. Create Discord: https://discord.gg/AjRTh6

null 12 Dec 7, 2022
Lib-Tile is a multi Maven project written in JavaFX and NetBeans IDE 8 and provides the functionalities to use and handle easily Tiles in your JavaFX application.

Lib-Tile Intention Lib-Tile is a multi Maven project written in JavaFX and NetBeans IDE and provides the functionalities to use and handle easily Tile

Peter Rogge 13 Apr 13, 2022
A JavaFX UI framework to create fully customized undecorated windows

CustomStage A JavaFX undecorated stage which can fully be customized Donations If this project is helpful to you and love my work and feel like showin

Oshan Mendis 186 Jan 6, 2023
CSS keyframe animation for JavaFX. Create animations like you would do with CSS.

JFXAnimation CSS keyframe animation for JavaFX. If you are using JFoenix JFXAnimation is included (currently version 1.0.0 only) Requirements JDK 8 an

Marcel Schlegel 49 Dec 28, 2022
A small tools to play with JavaFX Color.derive() function - allows to create custom colors and to save those in color palettes.

DeriveColorsFX This is not a serious application. Its a small tool where I just played with the method Color::deriveColor provided by JavaFX. Also its

Oliver Löffler 11 Oct 9, 2022
Tray Icon implementation for JavaFX applications. Say goodbye to using AWT's SystemTray icon, instead use a JavaFX Tray Icon.

FXTrayIcon Library intended for use in JavaFX applications that makes adding a System Tray icon easier. The FXTrayIcon class handles all the messy AWT

Dustin Redmond 248 Dec 30, 2022
JavaFX with CDI example project

javafx-cdi-example JavaFX with CDI example. ⚠️ In case you have a hi-resolution display and want to run the application on Ubuntu, make sure to pass a

fuin.org 4 Aug 4, 2022
Create your own auto-update framework

Read the documentation, explore the JavaDoc, or see it in action Create a framework: design the environment and lifecycle (—bootstrap) to make your ow

null 698 Dec 29, 2022
A maven plugin to include features from jmeter-plugins.org for JMeterPluginsCMD Command Line Tool to create graphs, export csv files from jmeter result files and Filter Result tool.

jmeter-graph-tool-maven-plugin A maven plugin to create graphs using the JMeter Plugins CMDRunner from JMeter result files (*.jtl or *.csv) or using F

Vincent DABURON 6 Nov 3, 2022