Browse Source

无任务,单元测试

research/10.0
yaoh.wu 5 years ago
parent
commit
f8cad425d1
  1. 1
      designer-base/src/test/java/com/fr/design/actions/help/TutorialActionTest.java
  2. 2
      designer-base/src/test/java/com/fr/design/mainframe/template/info/TemplateInfoCollectorTest.java

1
designer-base/src/test/java/com/fr/design/actions/help/TutorialActionTest.java

@ -24,6 +24,7 @@ public class TutorialActionTest extends TestCase{
GeneralContext.setLocale(pt); GeneralContext.setLocale(pt);
String ptKey = action.createDocKey(); String ptKey = action.createDocKey();
assertTrue(ptKey.contains(pt.toString())); assertTrue(ptKey.contains(pt.toString()));
GeneralContext.setLocale(Locale.CHINA);
} }
public void testServerOnline() { public void testServerOnline() {

2
designer-base/src/test/java/com/fr/design/mainframe/template/info/TemplateInfoCollectorTest.java

@ -56,6 +56,8 @@ public class TemplateInfoCollectorTest {
initialFileContent = FileUtils.readFileToString(new File(filePath), "utf-8"); initialFileContent = FileUtils.readFileToString(new File(filePath), "utf-8");
Reflect.on(TemplateInfoCollector.class).set("instance", null); Reflect.on(TemplateInfoCollector.class).set("instance", null);
// 后执行 testReadXML 用例时,之前保留的单例会造成影响
Reflect.on(DesignerOpenHistory.class).set("singleton", null);
} }
@After @After

Loading…
Cancel
Save