Coder Social home page Coder Social logo

fluent-assertions's Introduction

Fluent Assertions for JUnit 5

Build Status Coverage Quality Gate Status Maven Central

Set of Fluent Assertions for Unit Tests. Inspired by FEST Fluent Assertions 2.x.

Latest release

The most recent release is fluent-assertions 0.5, released 2018-04-12.

The Maven group ID is de.toberkoe, and the artifact ID is fluent-assertions. Use version 0.5 for the current version.

To add a dependency on fluent-assertions using Maven, use the following:

<dependency>
  <groupId>de.toberkoe</groupId>
  <artifactId>fluent-assertions</artifactId>
  <version>0.5</version>
  <scope>test</scope>
</dependency>

To add a dependency using Gradle:

dependencies {
  testImplementation 'de.toberkoe:fluent-assertions:0.5'
}

Examples

Use de.toberkoe.fluentassertions.api.Assertions#assertThat as entry point for type-specific fluent assertions. To make tests more readable, it is recommended to access this class as a static import.

import static de.toberkoe.fluentassertions.api.Assertions.assertThat;
...

List<Integer> numbers = List.of(1, 2, 3, 4, 5);
assertThat(numbers)
  .isNotEmpty()
  .hasSizeOf(5)
  .startsWith(1, 2, 3)
  .doesNotHaveDuplicates();

fluent-assertions's People

Contributors

toberkoe avatar

Watchers

 avatar

fluent-assertions's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.