Замена проекта в тесте на текущий.

This commit is contained in:
2024-03-02 01:44:03 +03:00
parent c34728f65d
commit 34504f9992
7 changed files with 83 additions and 11 deletions

View File

@@ -34,6 +34,14 @@ public class CreateTestFromDirectory extends Pass_2021<Test> {
File dir = null;
boolean from_directory_chooser = false;
Vector<ProjectFile> project_files = new Vector<>();
protected boolean initTarget() throws Exception{
target = new Test();
target.sender_address = Current.getAccount().email;
target.sender_name = Current.getAccount().name;
target.group_id = group.id;
target.description = dir.getName();
return true;
}
@Override
protected boolean canStart(Object... args) throws Exception {
if (args.length == 0) {
@@ -126,12 +134,9 @@ public class CreateTestFromDirectory extends Pass_2021<Test> {
group.language.PrintExtensions()
);
}
//-----
target = new Test();
target.sender_address = Current.getAccount().email;
target.sender_name = Current.getAccount().name;
target.group_id = group.id;
target.description = dir.getName();
//----
if (!initTarget()) return false;
//----
Vector<String> filesNames = new Vector<>();
for (ProjectFile projectFile : project_files)
filesNames.add(projectFile.file.getName());