1 package vid.automation.test.utils;
3 import com.fasterxml.jackson.databind.ObjectMapper;
4 import org.openecomp.sdc.ci.tests.utilities.FileHandling;
5 import vid.automation.test.model.User;
6 import vid.automation.test.model.UsersObject;
9 import java.io.IOException;
10 import java.util.HashMap;
12 public class ReadFile {
13 public static <T> T getJsonFile(String fileName, Class<T> clazz) throws IOException {
14 ObjectMapper mapper = new ObjectMapper();
17 File testCaseFile = FileHandling.getConfigFile(fileName);
18 if(!testCaseFile.exists()) {
19 String basePath = System.getProperty("BASE_PATH");
20 testCaseFile = new File( basePath + File.separator + "conf" + File.separator + fileName);
22 list = (T) mapper.readValue(testCaseFile, clazz);
24 } catch (IOException e) {
27 } catch (Exception e) {