package TestingSystem.Common;
import TestingSystem.SAPFOR.Json.SapforConfiguration_json;
import TestingSystem.SAPFOR.PerformSapforTask;
import TestingSystem.SAPFOR.SapforTask.SapforTask;

import java.io.File;
public class TaskThread extends Thread {
    public SapforTask task = null;
    public TaskThread(SapforTask task_, File sapfor_drv, SapforConfiguration_json sapforConfiguration_json) {
        super(() -> {
            while (!task_.state.isComplete()) {
                task_.Reset();
                new PerformSapforTask().Do(
                        sapfor_drv,
                        sapforConfiguration_json,
                        task_
                );
            }
        });
        task = task_;
    }
}
