Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use JSONAssert rather than assertEquals for better failure output / order insensitivity #1403

Merged
merged 1 commit into from
Mar 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions components-starter/camel-openapi-java-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
<version>${jsonassert-version}</version>
<scope>test</scope>
</dependency>
<!--START OF GENERATED CODE-->
<dependency>
<groupId>org.apache.camel.springboot</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

import org.junit.jupiter.api.Test;

import org.skyscreamer.jsonassert.JSONAssert;
import org.skyscreamer.jsonassert.JSONCompareMode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -134,7 +136,7 @@ private void checkSchemaGeneration(String uri, String apiVersion, String schemaR
.collect(Collectors.joining("\n"));
is.close();

assertEquals(expected, json);
JSONAssert.assertEquals(expected, json, JSONCompareMode.STRICT);
}

private BeanConfig getBeanConfig(String apiVersion) {
Expand Down
2 changes: 1 addition & 1 deletion tooling/camel-spring-boot-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4457,7 +4457,7 @@
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.13.1</version>
<version>3.15.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Loading