Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add option to generate chained assertions

Open
#38 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java

Research direction

Review the assertion-generation flow and the existing generated assertion API, using the ObjectA/ObjectB example in the issue as the starting case. Determine the generated entry points and define how nested chaining should be represented, then verify that the requested fluent form can be generated consistently.

Written by the indexing model from the issue text.

Description

Enhancement

Use case:

  • You have an object "objectA" of type ObjectA which contains (among other fields) a field objectB of type ObjectB
  • To assert it, I do
assertThat(objectA).hasFieldOfObjectA("field");
assertThat(objectA.objectB).hasFieldOfObjectB("fieldOfObjectB");
  • I'd like to be able to assert like this:
assertThat(objectA)
  .hasFieldOfObjectA("field")
  .withObjectB()
    .hasFieldOfObjectB("fieldOfObjectB");

I already do that manually, but I think it could be useful to be able to add this behavior automatically.

What do you think?

Dominant language
Java
Stars
30
Forks
27
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from assertj/assertj-assertions-generator-maven-plugin

All issues in assertj/assertj-assertions-generator-maven-plugin

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.