upgrade resteasy to junit5 (#18615)

* upgrade resteasy to junit5

* fix echo_api tests

* updated gradle/sbt/pom and generated samples with bin/generate-samples.sh

* fix xml syntax error

* forgot to run generate-samples.sh
This commit is contained in:
Thorsten Hirsch
2024-05-10 04:51:50 +02:00
committed by GitHub
parent 854e521a06
commit 3805cf366c
93 changed files with 331 additions and 324 deletions

View File

@@ -11,28 +11,18 @@
*/
package org.openapitools.client.api;
package org.openapitools.client;
import org.junit.jupiter.api.Test;
import org.openapitools.client.api.BodyApi;
import org.openapitools.client.api.EchoServerResponseParser;
import org.openapitools.client.ApiException;
import java.io.File;
import org.openapitools.client.model.Pet;
import org.openapitools.client.model.Tag;
import org.junit.Test;
import org.junit.Ignore;
import org.junit.Assert;
import java.io.FileWriter;
import java.io.IOException;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* API tests
@@ -62,12 +52,12 @@ public class CustomTest {
api.testBodyMultipartFormdataSingleBinary(myFile);
EchoServerResponseParser parser =
new EchoServerResponseParser(response);
new org.openapitools.client.api.EchoServerResponseParser(response);
String contentDisposition = parser.headers.get("Content-Disposition");
assertThat(contentDisposition, containsString(
assertThat(contentDisposition).contains(
"form-data; name=\"my-file\"; filename=\"test.txt\""
));
);
}
}

View File

@@ -14,9 +14,9 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiException;
import org.junit.Test;
import org.junit.Ignore;
import org.junit.Assert;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Assertions;
import java.time.LocalDate;
import java.time.OffsetDateTime;

View File

@@ -13,26 +13,16 @@
package org.openapitools.client.api;
import org.junit.jupiter.api.Test;
import org.openapitools.client.ApiException;
import java.io.File;
import org.openapitools.client.model.Pet;
import org.openapitools.client.model.Tag;
import org.junit.Test;
import org.junit.Ignore;
import org.junit.Assert;
import org.openapitools.client.api.EchoServerResponseParser;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* API tests for BodyApi
@@ -117,9 +107,9 @@ public class BodyApiTest {
String contentDisposition = parser.headers.get("Content-Disposition");
assertThat(contentDisposition, containsString(
assertThat(contentDisposition).contains(
"form-data; name=\"my-file\"; filename=\"test.txt\""
));
);
}
/**

View File

@@ -14,9 +14,9 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiException;
import org.junit.Test;
import org.junit.Ignore;
import org.junit.Assert;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Assertions;
import java.time.LocalDate;
import java.time.OffsetDateTime;

View File

@@ -15,9 +15,9 @@ package org.openapitools.client.api;
import org.openapitools.client.ApiException;
import org.openapitools.client.model.StringEnumRef;
import org.junit.Test;
import org.junit.Ignore;
import org.junit.Assert;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Assertions;
import java.time.LocalDate;
import java.time.OffsetDateTime;

View File

@@ -15,9 +15,9 @@ package org.openapitools.client.api;
import org.openapitools.client.ApiException;
import org.openapitools.client.model.StringEnumRef;
import org.junit.Test;
import org.junit.Ignore;
import org.junit.Assert;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Assertions;
import java.time.LocalDate;
import java.time.OffsetDateTime;

View File

@@ -21,9 +21,9 @@ import org.openapitools.client.model.Pet;
import org.openapitools.client.model.StringEnumRef;
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
import org.junit.Test;
import org.junit.Ignore;
import org.junit.Assert;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Assertions;
import java.time.LocalDate;
import java.time.OffsetDateTime;

View File

@@ -18,9 +18,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for Bird

View File

@@ -18,9 +18,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for Category

View File

@@ -23,9 +23,9 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.openapitools.client.model.Query;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for DataQuery

View File

@@ -26,9 +26,9 @@ import org.openapitools.jackson.nullable.JsonNullable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for DefaultValue

View File

@@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.math.BigDecimal;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for NumberPropertiesOnly

View File

@@ -23,9 +23,9 @@ import java.util.Arrays;
import java.util.List;
import org.openapitools.client.model.Category;
import org.openapitools.client.model.Tag;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for Pet

View File

@@ -21,9 +21,9 @@ import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for Query

View File

@@ -13,9 +13,9 @@
package org.openapitools.client.model;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for StringEnumRef

View File

@@ -18,9 +18,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for Tag

View File

@@ -18,9 +18,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for TestFormObjectMultipartRequestMarker

View File

@@ -18,9 +18,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter

View File

@@ -21,9 +21,9 @@ import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter