toString verifier

A tool to let you write unit test for the toString method. This can be especially usefull if you use the lombok plugin.

License

License

Categories

Categories

Java Languages
GroupId

GroupId

be.joengenduvel.java.verifiers
ArtifactId

ArtifactId

to-string
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

toString verifier
A tool to let you write unit test for the toString method. This can be especially usefull if you use the lombok plugin.
Project URL

Project URL

https://github.com/Joengenduvel/toStringVerifier
Source Code Management

Source Code Management

https://github.com/Joengenduvel/toStringVerifier

Download to-string

How to add to project

<!-- https://jarcasting.com/artifacts/be.joengenduvel.java.verifiers/to-string/ -->
<dependency>
    <groupId>be.joengenduvel.java.verifiers</groupId>
    <artifactId>to-string</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/be.joengenduvel.java.verifiers/to-string/
implementation 'be.joengenduvel.java.verifiers:to-string:1.0.2'
// https://jarcasting.com/artifacts/be.joengenduvel.java.verifiers/to-string/
implementation ("be.joengenduvel.java.verifiers:to-string:1.0.2")
'be.joengenduvel.java.verifiers:to-string:jar:1.0.2'
<dependency org="be.joengenduvel.java.verifiers" name="to-string" rev="1.0.2">
  <artifact name="to-string" type="jar" />
</dependency>
@Grapes(
@Grab(group='be.joengenduvel.java.verifiers', module='to-string', version='1.0.2')
)
libraryDependencies += "be.joengenduvel.java.verifiers" % "to-string" % "1.0.2"
[be.joengenduvel.java.verifiers/to-string "1.0.2"]

Dependencies

test (2)

Group / Artifact Type Version
junit : junit jar 4.11
org.hamcrest : hamcrest-all jar 1.3

Project Modules

There are no modules declared in this project.

Build Status

toStringVerifier

Verifies (unit tests) the toString method generated by Lombok.

    @Test
    public void shouldImplementToString(){
        SomeObject sut = SomeObject.builder().build();
        ToStringVerifier.forClass(SomeObject.class).containsAllPrivateFields(sut);
    }

Can be integrated via maven

<dependency>
    <groupId>be.joengenduvel.java.verifiers</groupId>
    <artifactId>to-string</artifactId>
    <version>1.0.2</version>
    <scope>test</scope>
</dependency>

Versions

Version
1.0.2