package com.zjty.automatedtesting.util;


import com.zjty.automatedtesting.pojo.test.Case;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;

/**
 * <p>Description : measurement
 * <p>Date : 2020/1/16 15:27
 * <p>@author : C
 */
public class FileUtil {

    private final static String WORK_PATH = System.getProperty("user.dir") + "\\";

    private Case parseFilToTestCase(String fileName) throws IOException {
        List<String> lines = Files.readAllLines(Paths.get(WORK_PATH + fileName));
        StringBuilder builder = new StringBuilder();
        lines.forEach(builder::append);
        String data = builder.toString();
        return JsonUtil.readValue(data, Case.class);
    }
}
