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 8e8bf7e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.64</minimum>
<minimum>0.86</minimum>
</limit>
<limit>
<counter>BRANCH</counter>
Expand Down
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 8e8bf7e

Please sign in to comment.