промежуточный. Рефакторинг публикации теста из текущего проекта.
This commit is contained in:
@@ -7,7 +7,6 @@ import Common.Utils.Utils;
|
||||
import ProjectData.Project.db_project_info;
|
||||
import TestingSystem.Common.Test.Test;
|
||||
import TestingSystem.Common.TestingServer;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Server.PublishServerObject;
|
||||
public class PublishTest extends PublishServerObject<TestingServer, Test> {
|
||||
boolean from_current_project;
|
||||
@@ -19,9 +18,12 @@ public class PublishTest extends PublishServerObject<TestingServer, Test> {
|
||||
@Override
|
||||
public boolean fillObjectFields() throws Exception {
|
||||
target.description = project.getLocalName();
|
||||
if (!project.description.isEmpty())
|
||||
if (!project.description.isEmpty()) {
|
||||
target.description += " " + project.description;
|
||||
target.description = Utils.ReplaceForbiddenSymbols(target.description);
|
||||
}
|
||||
target.group_id = group_id;
|
||||
//--
|
||||
if (from_current_project) {
|
||||
target.dim = project.testMaxDim;
|
||||
return super.fillObjectFields();
|
||||
@@ -39,7 +41,7 @@ public class PublishTest extends PublishServerObject<TestingServer, Test> {
|
||||
}
|
||||
@Override
|
||||
protected void performPreparation() throws Exception {
|
||||
target.description = Utils.ReplaceForbiddenSymbols(target.description);
|
||||
target.packProject(project);
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
@@ -66,11 +68,6 @@ public class PublishTest extends PublishServerObject<TestingServer, Test> {
|
||||
return super.canStart(args);
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
super.performDone();
|
||||
passes.get(PassCode_2021.PublishTestProject).Do(project, pk);
|
||||
}
|
||||
@Override
|
||||
protected void performFinish() throws Exception {
|
||||
if (from_current_project)
|
||||
super.performFinish();
|
||||
|
||||
Reference in New Issue
Block a user