fix(接口测试): 修复脚本断言语言名称找不到的问题
This commit is contained in:
parent
1c1a6ad74f
commit
23b28d11b5
|
@ -142,7 +142,14 @@ public class MsAssertions extends MsTestElement {
|
|||
assertion.setProperty(TestElement.TEST_CLASS, JSR223Assertion.class.getName());
|
||||
assertion.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI"));
|
||||
assertion.setProperty("cacheKey", "true");
|
||||
assertion.setProperty("scriptLanguage", assertionJSR223.getScriptLanguage());
|
||||
String scriptLanguage = assertionJSR223.getScriptLanguage();
|
||||
if (StringUtils.equals(scriptLanguage, "nashornScript")) {
|
||||
scriptLanguage = "nashorn";
|
||||
}
|
||||
if (StringUtils.equals(scriptLanguage, "rhinoScript")) {
|
||||
scriptLanguage = "rhino";
|
||||
}
|
||||
assertion.setProperty("scriptLanguage", scriptLanguage);
|
||||
assertion.setProperty("script", assertionJSR223.getScript());
|
||||
return assertion;
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ public class MsJSR223Processor extends MsTestElement {
|
|||
processor.setProperty("scriptLanguage", "nashorn");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(this.getScriptLanguage()) && this.getScriptLanguage().equals("rhinoScript")) {
|
||||
processor.setProperty("scriptLanguage", "javascript");
|
||||
processor.setProperty("scriptLanguage", "rhino");
|
||||
}
|
||||
processor.setProperty("script", this.getScript());
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ public class MsJSR223PostProcessor extends MsTestElement {
|
|||
processor.setProperty("scriptLanguage", "nashorn");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(this.getScriptLanguage()) && this.getScriptLanguage().equals("rhinoScript")) {
|
||||
processor.setProperty("scriptLanguage", "javascript");
|
||||
processor.setProperty("scriptLanguage", "rhino");
|
||||
}
|
||||
processor.setProperty("script", this.getScript());
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ public class MsJSR223PreProcessor extends MsTestElement {
|
|||
processor.setProperty("scriptLanguage", "nashorn");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(this.getScriptLanguage()) && this.getScriptLanguage().equals("rhinoScript")) {
|
||||
processor.setProperty("scriptLanguage", "javascript");
|
||||
processor.setProperty("scriptLanguage", "rhino");
|
||||
}
|
||||
|
||||
processor.setProperty("script", this.getScript());
|
||||
|
|
Loading…
Reference in New Issue