use of com.google.security.zynamics.binnavi.disassembly.Modules.MockModule in project binnavi by google.
the class CCodeBookmarkTableModelTest method test7removeBookmarkWorking.
@Test
public void test7removeBookmarkWorking() {
final CCodeBookmarkManager bookmarkManager = new CCodeBookmarkManager();
final CCodeBookmarkTableModel tableModel = new CCodeBookmarkTableModel(bookmarkManager);
final CCodeBookmark bookmark = new CCodeBookmark(new MockModule(), new MockAddress(), "burzel");
bookmarkManager.addBookmark(bookmark);
assertEquals("burzel", tableModel.getValueAt(0, 2));
tableModel.setValueAt("working", 0, 2);
assertEquals(1, tableModel.getRowCount());
assertEquals("working", tableModel.getValueAt(0, 2));
bookmarkManager.removeBookmark(bookmark);
assertEquals(0, tableModel.getRowCount());
}
use of com.google.security.zynamics.binnavi.disassembly.Modules.MockModule in project binnavi by google.
the class CBookmarkFunctionsTest method test1AddBookmark.
@Test
public void test1AddBookmark() {
final CCodeBookmarkManager bookmarkManager = new CCodeBookmarkManager();
final MockAddress mockAddress = new MockAddress();
final MockModule mockModule = new MockModule();
assertEquals(0, bookmarkManager.size());
CBookmarkFunctions.addBookmark(bookmarkManager, mockModule, mockAddress);
assertEquals(1, bookmarkManager.size());
}
use of com.google.security.zynamics.binnavi.disassembly.Modules.MockModule in project binnavi by google.
the class ZyGraphTest method setUp.
@Before
public void setUp() throws IllegalStateException, FileReadException, LoadCancelledException {
ConfigManager.instance().read();
final ZyGraphViewSettings settings = ConfigManager.instance().getDefaultFlowGraphSettings();
settings.getProximitySettings().setProximityBrowsingActivationThreshold(50);
settings.getProximitySettings().setProximityBrowsingChildren(2);
settings.getProximitySettings().setProximityBrowsingParents(2);
ConfigManager.instance().updateFlowgraphSettings(settings);
m_provider = new MockSqlProvider();
m_module = new MockModule(m_provider);
m_function = new MockFunction(m_provider);
m_view = MockViewGenerator.generate(m_provider, m_module, m_function);
m_graph = CGraphBuilder.buildGraph(m_view);
}
use of com.google.security.zynamics.binnavi.disassembly.Modules.MockModule in project binnavi by google.
the class ZyProximityBrowserTest method setUp.
@Before
public void setUp() throws IllegalStateException, FileReadException, LoadCancelledException {
ConfigManager.instance().read();
final ZyGraphViewSettings settings = ConfigManager.instance().getDefaultFlowGraphSettings();
settings.getProximitySettings().setProximityBrowsingActivationThreshold(50);
settings.getProximitySettings().setProximityBrowsingChildren(2);
settings.getProximitySettings().setProximityBrowsingParents(2);
ConfigManager.instance().updateFlowgraphSettings(settings);
m_provider = new MockSqlProvider();
final INaviModule module = new MockModule(m_provider);
final MockFunction function = new MockFunction(m_provider);
m_view = MockViewGenerator.generate(m_provider, module, function);
m_graph = CGraphBuilder.buildGraph(m_view);
}
use of com.google.security.zynamics.binnavi.disassembly.Modules.MockModule in project binnavi by google.
the class CFunctionTest method setUp.
@Before
public void setUp() {
provider = new MockSqlProvider();
module = new MockModule(provider);
view = new MockView(provider);
address = new CAddress(0x12345678L);
}
Aggregations