Skip to content

Commit

Permalink
Update SharedTypeScriptTest.java (#13956)
Browse files Browse the repository at this point in the history
  • Loading branch information
yannizhou05 committed Dec 6, 2022
1 parent 2524e8f commit d06ab43
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.*;

Expand Down Expand Up @@ -85,14 +86,15 @@ public void toModelImportMapTest() {
TypeScriptAxiosClientCodegen codegen = new TypeScriptAxiosClientCodegen();

Map<String, String[]> types = new HashMap<String, String[]>() {{
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<String, String[]> entry : types.entrySet()) {
String[] mapped = codegen.toModelImportMap(entry.getKey()).values().toArray(new String[0]);
Arrays.sort(mapped);
Assert.assertEquals(mapped, entry.getValue());
}
}
Expand Down

0 comments on commit d06ab43

Please sign in to comment.