Search in sources :

Example 11 with ZyNormalNodeRealizer

use of com.google.security.zynamics.zylib.yfileswrap.gui.zygraph.realizers.ZyNormalNodeRealizer in project binnavi by google.

the class GraphSearcherTest method testSimpleMultiple.

@Test
public void testSimpleMultiple() {
    final ZyNodeRealizer<NaviNode> r = new ZyNormalNodeRealizer<NaviNode>(m_content);
    final NaviNode m_node1 = new NaviNode(m_ynode, r, m_codeNode1);
    final GraphSearcher searcher = new GraphSearcher();
    m_content.addLineContent(new ZyLineContent("Hello my my Test", null));
    searcher.search(Lists.newArrayList(m_node1), new ArrayList<NaviEdge>(), "my");
    assertEquals(m_node1, searcher.getCursor().current().getObject());
    assertEquals(0, searcher.getCursor().current().getLine());
    assertEquals(6, searcher.getCursor().current().getPosition());
    assertEquals(2, searcher.getCursor().current().getLength());
}
Also used : ZyNormalNodeRealizer(com.google.security.zynamics.zylib.yfileswrap.gui.zygraph.realizers.ZyNormalNodeRealizer) NaviNode(com.google.security.zynamics.binnavi.yfileswrap.zygraph.NaviNode) GraphSearcher(com.google.security.zynamics.binnavi.yfileswrap.Gui.GraphWindows.Searchers.Text.Model.GraphSearcher) ZyLineContent(com.google.security.zynamics.zylib.gui.zygraph.realizers.ZyLineContent) NaviEdge(com.google.security.zynamics.binnavi.yfileswrap.zygraph.NaviEdge) Test(org.junit.Test)

Aggregations

NaviNode (com.google.security.zynamics.binnavi.yfileswrap.zygraph.NaviNode)11 ZyNormalNodeRealizer (com.google.security.zynamics.zylib.yfileswrap.gui.zygraph.realizers.ZyNormalNodeRealizer)11 NaviEdge (com.google.security.zynamics.binnavi.yfileswrap.zygraph.NaviEdge)10 GraphSearcher (com.google.security.zynamics.binnavi.yfileswrap.Gui.GraphWindows.Searchers.Text.Model.GraphSearcher)8 ZyLineContent (com.google.security.zynamics.zylib.gui.zygraph.realizers.ZyLineContent)8 Test (org.junit.Test)8 MockSqlProvider (com.google.security.zynamics.binnavi.Database.MockClasses.MockSqlProvider)3 CModule (com.google.security.zynamics.binnavi.disassembly.Modules.CModule)3 ZyLabelContent (com.google.security.zynamics.zylib.gui.zygraph.realizers.ZyLabelContent)3 MockDatabase (com.google.security.zynamics.binnavi.Database.MockClasses.MockDatabase)2 CallGraphSettingsConfigItem (com.google.security.zynamics.binnavi.config.CallGraphSettingsConfigItem)2 CTextNode (com.google.security.zynamics.binnavi.disassembly.CTextNode)2 INaviEdge (com.google.security.zynamics.binnavi.disassembly.INaviEdge)2 CView (com.google.security.zynamics.binnavi.disassembly.views.CView)2 ZyGraph (com.google.security.zynamics.binnavi.yfileswrap.zygraph.ZyGraph)2 CAddress (com.google.security.zynamics.zylib.disassembly.CAddress)2 ZyGraph2DView (com.google.security.zynamics.zylib.yfileswrap.gui.zygraph.ZyGraph2DView)2 ZyEdgeRealizer (com.google.security.zynamics.zylib.yfileswrap.gui.zygraph.realizers.ZyEdgeRealizer)2 Date (java.util.Date)2 LinkedHashMap (java.util.LinkedHashMap)2