Created
January 12, 2026 09:12
-
-
Save borodicht/1cd4ff52ae01af9d05a51e37b1df6d13 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import model.TestSuite; | |
| import java.nio.file.Files; | |
| import java.nio.file.Path; | |
| public class TestcasesParser { | |
| public static TestSuite parse(String path) { | |
| try { | |
| String json = Files.readString(Path.of(path)); | |
| ObjectMapper mapper = new ObjectMapper(); | |
| return mapper.readValue(json, TestSuite.class); | |
| } catch (Exception e) { | |
| throw new RuntimeException("Failed to parse testcases.json", e); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment