Skip to content

Commit

Permalink
update: wiki locale
Browse files Browse the repository at this point in the history
  • Loading branch information
sakurawald committed Jul 26, 2024
1 parent 06432e8 commit cd42691
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/test/java/generator/DocsGeneratorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.junit.jupiter.api.Test;

import java.io.FileReader;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Path;

Expand Down Expand Up @@ -45,11 +46,14 @@ private void generate(Object javaObject, String configFileName, String languageC
generate(configJson, configFileName, languageCode);
}

@SneakyThrows
private void generate(Path jsonFile, String languageCode) {
JsonReader jsonReader = new JsonReader(new FileReader(jsonFile.toFile()));
JsonObject jsonObject = GSON.fromJson(jsonReader, JsonObject.class);
generate(jsonObject, jsonFile.toFile().getName(), languageCode);
try {
JsonReader jsonReader = new JsonReader(new FileReader(jsonFile.toFile()));
JsonObject jsonObject = GSON.fromJson(jsonReader, JsonObject.class);
generate(jsonObject, jsonFile.toFile().getName(), languageCode);
} catch (IOException e) {
System.out.println("IOException: " + e);
}
}

@Test
Expand Down

0 comments on commit cd42691

Please sign in to comment.