first of all, thank you so much for this plugin, which I find extremely nice and useful! 💙
This is to let you know that I today noticed (for the first time, by the way! 👍) an invalid transformation in the following case:
importjava.util.Map;import staticorg.assertj.core.api.Assertions.assertThat;classAssertMapEntryUsingRecursiveComparisonTest{@org.junit.jupiter.api.TestvoidusingRecursiveComparison(){Map<String,DTO>map=Map.of("1",newDTO(1,"one"));assertThat(map).containsOnlyKeys("1");assertThat(map.get("1")).usingRecursiveComparison().isEqualTo(newDTO(1,"one"));}staticclassDTO{// doesn't implement equals based on fieldsfinalinti;finalStrings;DTO(inti,Strings){this.i=i;this.s=s;}}}
– which doesn't work with the current version org.assertj:assertj-core:3.19.0.
Vielen Dank und schöne Grüße, 😉
Manfred
Hi @chrisly42,
first of all, thank you so much for this plugin, which I find extremely nice and useful! 💙
This is to let you know that I today noticed (for the first time, by the way! 👍) an invalid transformation in the following case:
```java
import java.util.Map;
import static org.assertj.core.api.Assertions.assertThat;
class AssertMapEntryUsingRecursiveComparisonTest {
@org.junit.jupiter.api.Test
void usingRecursiveComparison() {
Map<String, DTO> map = Map.of("1", new DTO(1, "one"));
assertThat(map).containsOnlyKeys("1");
assertThat(map.get("1")).usingRecursiveComparison().isEqualTo(new DTO(1, "one"));
}
static class DTO { // doesn't implement equals based on fields
final int i;
final String s;
DTO(int i, String s) {
this.i = i;
this.s = s;
}
}
}
```
Cajon v1.11 replaces
```java
assertThat(map.get(key)).usingRecursiveComparison().isEqualTo(value)
```
with
```java
assertThat(map).usingRecursiveComparison().containsEntry(key, value)
```
– which doesn't work with the current version `org.assertj`:`assertj-core`:`3.19.0`.
Vielen Dank und schöne Grüße, 😉
Manfred
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hi @chrisly42,
first of all, thank you so much for this plugin, which I find extremely nice and useful! 💙
This is to let you know that I today noticed (for the first time, by the way! 👍) an invalid transformation in the following case:
Cajon v1.11 replaces
with
– which doesn't work with the current version
org.assertj:assertj-core:3.19.0.Vielen Dank und schöne Grüße, 😉
Manfred
Dear Manfred,
long time no see :) I hope you are well. You are perfectly right about this issue, and I will fix it as soon as possible.
Cheers,
Chris
Fixed with V1.12