use of javax.swing.tree.DefaultMutableTreeNode in project binnavi by google.
the class CDebuggerNodeTest method testListenersRemoved.
@Test
public void testListenersRemoved() throws IllegalArgumentException, SecurityException, IllegalAccessException, NoSuchFieldException {
final CDebuggerNode node = new CDebuggerNode(m_tree, new DefaultMutableTreeNode(), m_database, m_template);
node.dispose();
assertTrue(((Collection<?>) ReflectionHelpers.getField(ReflectionHelpers.getField(m_database, "listeners"), "m_listeners")) == null);
}
use of javax.swing.tree.DefaultMutableTreeNode in project binnavi by google.
the class CDebuggerNodeTest method testConstructor.
@Test
public void testConstructor() {
final CDebuggerNode node = new CDebuggerNode(m_tree, new DefaultMutableTreeNode(), m_database, m_template);
assertEquals(m_template, node.getObject());
assertNotNull(node.getComponent());
}
use of javax.swing.tree.DefaultMutableTreeNode in project binnavi by google.
the class TypesTreeModelTests method testTypeUpdated.
@Test
public void testTypeUpdated() throws CouldntSaveDataException {
final DefaultMutableTreeNode root = createModel();
typeManager.updateType(typeSystem.simpleStruct, "AAAAA", typeSystem.simpleStruct.getBitSize(), false);
final Multimap<Integer, DefaultMutableTreeNode> nodesByLevel = getNodesByLevel(root);
Assert.assertEquals(LEVEL_0_NODES, nodesByLevel.get(0).size());
Assert.assertEquals(LEVEL_1_NODES, nodesByLevel.get(1).size());
Assert.assertEquals(LEVEL_2_NODES, nodesByLevel.get(2).size());
Assert.assertEquals(LEVEL_3_NODES, nodesByLevel.get(3).size());
Assert.assertEquals(LEVEL_4_NODES, nodesByLevel.get(4).size());
verifySorted(root);
}
use of javax.swing.tree.DefaultMutableTreeNode in project binnavi by google.
the class TypesTreeModelTests method testDefaultConstructor.
@Test
public void testDefaultConstructor() {
final DefaultMutableTreeNode root = createModel();
final Multimap<Integer, DefaultMutableTreeNode> nodesByLevel = getNodesByLevel(root);
Assert.assertEquals(LEVEL_0_NODES, nodesByLevel.get(0).size());
Assert.assertEquals(LEVEL_1_NODES, nodesByLevel.get(1).size());
Assert.assertEquals(LEVEL_2_NODES, nodesByLevel.get(2).size());
Assert.assertEquals(LEVEL_3_NODES, nodesByLevel.get(3).size());
Assert.assertEquals(LEVEL_4_NODES, nodesByLevel.get(4).size());
verifySorted(root);
}
use of javax.swing.tree.DefaultMutableTreeNode in project binnavi by google.
the class TypesTreeModelTests method testMemberAdded.
@Test
public void testMemberAdded() throws CouldntSaveDataException {
final DefaultMutableTreeNode root = createModel();
typeManager.appendMember(typeSystem.simpleStruct, typeSystem.intType, "new_member");
final Multimap<Integer, DefaultMutableTreeNode> nodesByLevel = getNodesByLevel(root);
Assert.assertEquals(LEVEL_0_NODES, nodesByLevel.get(0).size());
Assert.assertEquals(LEVEL_1_NODES, nodesByLevel.get(1).size());
Assert.assertEquals(LEVEL_2_NODES + 1, nodesByLevel.get(2).size());
Assert.assertEquals(LEVEL_3_NODES + 2, nodesByLevel.get(3).size());
Assert.assertEquals(LEVEL_4_NODES + 1, nodesByLevel.get(4).size());
verifySorted(root);
}
Aggregations