treecomponenttest.java
来自「基于Junit的 功能和单元测试的的测试工具。只支持Swing.」· Java 代码 · 共 29 行
JAVA
29 行
package org.uispec4j;
import org.uispec4j.utils.UIComponentFactory;
import org.uispec4j.xml.XmlAssert;
import javax.swing.*;
public class TreeComponentTest extends UIComponentTestCase {
public void testGetComponentTypeName() throws Exception {
assertEquals("tree", UIComponentFactory.createUIComponent(new JTree()).getDescriptionTypeName());
}
public void testGetDescription() throws Exception {
JTree jTree = new JTree();
jTree.setName("myTree");
Tree tree = new Tree(jTree);
XmlAssert.assertEquivalent("<tree name='myTree'/>", tree.getDescription());
}
public void testFactory() throws Exception {
checkFactory(new JButton(), Button.class);
}
protected UIComponent createComponent() {
return new Tree(new JTree());
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?