Skip to content

Commit

Permalink
Issue checkstyle#11514: Added Test cases to TreeTableTest.java for Tr…
Browse files Browse the repository at this point in the history
…eeTebleModelAdapter class to increase overall coverage
  • Loading branch information
jZwielich committed May 21, 2023
1 parent 70946a8 commit ce297a9
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,22 @@ public void testFindNodesInvalidCharacterInExpression() throws IOException {
.that(xpathTextArea.getText())
.isEqualTo(expected);
}

@Test
public void testTreeModelAdapterMethods() throws IOException {
final MainFrame mainFrame = new MainFrame();
mainFrame.openFile(new File(getPath("InputTreeTableXpathAreaPanel.java")));

assertWithMessage("Value at Column (0, 3) expected to equal 0")
.that(treeTable.getValueAt(0, 3).equals(0))
.isEqualTo(true);

assertWithMessage("getColumn class expected to return string class")
.that(treeTable.getColumnClass(4).equals(String.class))
.isEqualTo(true);

assertWithMessage("Selected cell expected not be editable")
.that(treeTable.isCellEditable(1, 0))
.isEqualTo(false);
}
}

0 comments on commit ce297a9

Please sign in to comment.