Add option to generate chained assertions
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
- Domain
- build-system, tooling
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
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from assertj/assertj-assertions-generator-maven-plugin
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Move module to `assertj/assertj-generator`May be free again @scordio claimed this 504 days ago, and no pull request is open. Open
assertj/assertj-assertions-generator-maven-plugin#113 · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
assertj/assertj-assertions-generator-maven-plugin#108 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
allow the jakarta version of `@Generated` instead of the javax one.May be free again @scordio claimed this 526 days ago, and no pull request is open. Open
assertj/assertj-assertions-generator-maven-plugin#93 · 7 comments · 7 reactions · 1 assignee ·
All issues in assertj/assertj-assertions-generator-maven-plugin
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
go 🏃 testing 🧪
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
valkey-io/valkey-glide#7239 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
github/copilot-sdk#2793 ·
Maintainers usually reply within 1 day