2024-03-02 01:44:03 +03:00
|
|
|
package Visual_DVM_2021.Passes.All;
|
2024-10-08 00:39:13 +03:00
|
|
|
import Common.CurrentAnchestor;
|
2024-10-09 22:01:19 +03:00
|
|
|
import _VisualDVM.Current;
|
2024-03-02 01:44:03 +03:00
|
|
|
import Repository.Server.ServerCode;
|
|
|
|
|
import Repository.Server.ServerExchangeUnit_2021;
|
|
|
|
|
import Visual_DVM_2021.Passes.PassCode_2021;
|
|
|
|
|
import Visual_DVM_2021.Passes.Server.TestingSystemPass;
|
|
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
public class ReplaceTestProject extends CreateTestFromProject {
|
|
|
|
|
@Override
|
|
|
|
|
public String getIconPath() {
|
|
|
|
|
return "/icons/Menu/Undo.png";
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected void performDone() throws Exception {
|
|
|
|
|
TestingSystemPass testingSystemPass = new TestingSystemPass() {
|
|
|
|
|
@Override
|
|
|
|
|
protected boolean canStart(Object... args) throws Exception {
|
|
|
|
|
target = args[0];
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
return "Замена кода теста на сервере";
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected void ServerAction() throws Exception {
|
|
|
|
|
Command(new ServerExchangeUnit_2021(ServerCode.ReplaceTestCode, null, (Serializable) target));
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
testingSystemPass.Do(target);
|
|
|
|
|
passes.get(PassCode_2021.SynchronizeTests).Do();
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected boolean initTarget() throws Exception {
|
2024-10-08 00:39:13 +03:00
|
|
|
if (CurrentAnchestor.Check(Log, Current.Test)) {
|
2024-03-02 01:44:03 +03:00
|
|
|
target = Current.getTest();
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|