Handle generics of real numbers
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the issue with the provided Of and OfDouble extends Of example, then trace the generic assertion-generation entry point that classifies Double and Float. Done means generated assertions treat Double and Float as real values and include the expected hasValueCloseTo overload.
Written by the indexing model from the issue text.
Description
The generation of asserts for generics does not handle reals (Double or Float) as expected: Double/Float are processed as Objects, while they should be processed as reals.
Ex:
class Of<T> {
T value;
}
class OfDouble extends Of<Double> {
}
Actual result:
class OfDoubleAssert extends AbstractAssert<OfDoubleAssert , OfDouble> {
public OfDoubleAssert hasValue(Comparable avg) {
...
}
}
Expected result:
class OfDoubleAssert extends AbstractAssert<OfDoubleAssert , OfDouble> {
public OfDoubleAssert hasValue(Comparable avg) {
...
}
public Double hasValueCloseTo(Double value, Double offset) {
...
}
}
Thanks !
- Dominant language
- Java
- Stars
- 72
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Contributor 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-generator
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
assertj/assertj-generator#278 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
assertj/assertj-generator#220 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
assertj/assertj-generator#219 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
assertj/assertj-generator#204 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
assertj/assertj-generator#197 · 7 comments ·
All issues in assertj/assertj-generator
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100