44 lines
1.6 KiB
Java
44 lines
1.6 KiB
Java
package TestingSystem.SAPFOR.Json;
|
|
import Common.Constants;
|
|
import TestingSystem.SAPFOR.SapforTask.SapforTask;
|
|
import Visual_DVM_2021.Passes.PassCode_2021;
|
|
import com.google.gson.annotations.Expose;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.List;
|
|
import java.util.Vector;
|
|
public class SapforTestingSet_json implements Serializable {
|
|
@Expose
|
|
public int id = Constants.Nan;
|
|
@Expose
|
|
public List<SapforTest_json> tests = new Vector<>();
|
|
@Expose
|
|
public List<SapforConfiguration_json> configurations = new Vector<>();
|
|
public Vector<SapforTask> createTasks() {
|
|
Vector<SapforTask> tasks = new Vector<>();
|
|
//-
|
|
for (SapforConfiguration_json sapforConfiguration_json : configurations) {
|
|
for (SapforTest_json test : tests) {
|
|
SapforTask task = new SapforTask();
|
|
//--
|
|
task.id = Constants.Nan;
|
|
task.sapfortaskspackage_id = Constants.Nan;
|
|
//-- unique key--
|
|
task.group_description = test.group_description;
|
|
task.test_description = test.description;
|
|
task.sapfor_configuration_id = sapforConfiguration_json.id;
|
|
//---------------
|
|
task.flags = sapforConfiguration_json.flags;
|
|
task.set_id = id;
|
|
tasks.add(task);
|
|
Vector<String> codes_s = new Vector<>();
|
|
for (PassCode_2021 code : sapforConfiguration_json.codes)
|
|
codes_s.add(code.toString());
|
|
task.codes = String.join(" ", codes_s);
|
|
}
|
|
}
|
|
//-
|
|
return tasks;
|
|
}
|
|
}
|