Search in sources :

Example 11 with CCachedColorCriterium

use of com.google.security.zynamics.binnavi.Gui.CriteriaDialog.Conditions.NodeColor.CCachedColorCriterium in project binnavi by google.

the class CCriteriumExecuterTest method testSingleColorCriterion.

@Test
public void testSingleColorCriterion() {
    final CCachedColorCriterium criterium = new CCachedColorCriterium(Color.RED);
    final CCachedExpressionTreeNode node = new CCachedExpressionTreeNode(criterium);
    CCachedExpressionTreeNode.append(m_tree.getRoot(), node);
    assertEquals(0, m_graph.getSelectedNodes().size());
    CCriteriumExecuter.execute(m_tree, m_graph);
    assertEquals(1, m_graph.getSelectedNodes().size());
    assertTrue(m_graph.getRawView().getGraph().getNodes().get(1).isSelected());
}
Also used : CCachedColorCriterium(com.google.security.zynamics.binnavi.Gui.CriteriaDialog.Conditions.NodeColor.CCachedColorCriterium) CCachedExpressionTreeNode(com.google.security.zynamics.binnavi.Gui.CriteriaDialog.ExpressionModel.CCachedExpressionTreeNode) Test(org.junit.Test)

Aggregations

CCachedColorCriterium (com.google.security.zynamics.binnavi.Gui.CriteriaDialog.Conditions.NodeColor.CCachedColorCriterium)11 CCachedExpressionTreeNode (com.google.security.zynamics.binnavi.Gui.CriteriaDialog.ExpressionModel.CCachedExpressionTreeNode)11 Test (org.junit.Test)11 CCachedAndCriterium (com.google.security.zynamics.binnavi.Gui.CriteriaDialog.Conditions.And.CCachedAndCriterium)4 CCachedTextCriterium (com.google.security.zynamics.binnavi.Gui.CriteriaDialog.Conditions.Text.CCachedTextCriterium)4 CCachedOrCriterium (com.google.security.zynamics.binnavi.Gui.CriteriaDialog.Conditions.Or.CCachedOrCriterium)3 CCachedNotCriterium (com.google.security.zynamics.binnavi.Gui.CriteriaDialog.Conditions.Not.CCachedNotCriterium)2 CCriteriumCache (com.google.security.zynamics.binnavi.Gui.CriteriaDialog.Cache.CCriteriumCache)1 CCachedExpressionTree (com.google.security.zynamics.binnavi.Gui.CriteriaDialog.ExpressionModel.CCachedExpressionTree)1