From d06ab43dd6e0d3765d8138f23127050cb19f30c1 Mon Sep 17 00:00:00 2001 From: yannizhou05 <61256379+yannizhou05@users.noreply.github.com> Date: Tue, 6 Dec 2022 00:27:05 -0600 Subject: [PATCH] Update SharedTypeScriptTest.java (#13956) --- .../codegen/typescript/SharedTypeScriptTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/SharedTypeScriptTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/SharedTypeScriptTest.java index 7a769cc8d199..3b2169950de0 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/SharedTypeScriptTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/SharedTypeScriptTest.java @@ -15,6 +15,7 @@ import java.util.List; import java.util.Map; import java.util.HashMap; +import java.util.Arrays; import static org.openapitools.codegen.typescript.TypeScriptGroups.*; @@ -85,14 +86,15 @@ public void toModelImportMapTest() { TypeScriptAxiosClientCodegen codegen = new TypeScriptAxiosClientCodegen(); Map types = new HashMap() {{ - put("Schema & AnotherSchema", new String[]{ "Schema", "AnotherSchema" }); - put("Schema | AnotherSchema", new String[]{ "Schema", "AnotherSchema" }); + put("Schema & AnotherSchema", new String[]{ "AnotherSchema", "Schema" }); + put("Schema | AnotherSchema", new String[]{ "AnotherSchema", "Schema" }); put("Schema & object", new String[]{ "Schema" }); put("Schema | object", new String[]{ "Schema" }); }}; for (Map.Entry entry : types.entrySet()) { String[] mapped = codegen.toModelImportMap(entry.getKey()).values().toArray(new String[0]); + Arrays.sort(mapped); Assert.assertEquals(mapped, entry.getValue()); } }