public static <MODEL> List<MODEL> getMultiModelList(Class<MODEL> listClass, String... files) { if (sModelMaker == null) { sModelMaker = new ModelMaker(); } List<MODEL> models = new ArrayList<>(); for (int i = 0; i < files.length; i++) { models.add(sModelMaker.innerGetModel(listClass, files[i])); } return models; }
/** * Gets a model from the given file * * @param modelClass Type of the model * @param fileName Name of the json file (without extension). Relative to src/test/resources * @return Deserialized model */ public static <MODEL> MODEL getModel(Class<MODEL> modelClass, String fileName) { if (sModelMaker == null) { sModelMaker = new ModelMaker(); } return sModelMaker.innerGetModel(modelClass, fileName); }