Search in sources :

Example 1 with CModuleOverviewPanel

use of com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Module.Component.CModuleOverviewPanel in project binnavi by google.

the class CModuleOverviewPanelTest method setUp.

@Before
public void setUp() throws CouldntLoadDataException, IllegalArgumentException, SecurityException, IllegalAccessException, NoSuchFieldException, FileReadException, LoadCancelledException {
    ConfigManager.instance().read();
    final JTree tree = new JTree();
    m_database = new MockDatabase(m_provider);
    m_project = new CProject(1, "Mock Project", "Mock Project Description", new Date(), new Date(), 0, new ArrayList<DebuggerTemplate>(), m_provider);
    m_project.load();
    final DebuggerTemplate template = new DebuggerTemplate(1, "Mock Debugger", "localhaus", 88, m_provider);
    m_module = new CModule(123, "Name", "Comment", new Date(), new Date(), "12345678123456781234567812345678", "1234567812345678123456781234567812345678", 55, 66, new CAddress(0x555), new CAddress(0x666), template, null, Integer.MAX_VALUE, false, m_provider);
    m_database.getContent().getDebuggerTemplateManager().addDebugger(template);
    m_viewContainer = new CModuleContainer(m_database, m_module);
    m_component = new CModuleOverviewPanel(tree, m_database, null, m_module, m_viewContainer);
    m_saveButton = (JButton) ReflectionHelpers.getField(m_component, "m_saveButton");
    m_editPanel = (CStandardEditPanel) ReflectionHelpers.getField(m_component, "m_stdEditPanel");
    m_fileBaseAddr = (JTextField) ReflectionHelpers.getField(ReflectionHelpers.getField(m_component, "m_debuggerPanel"), "m_fileBaseAddr");
    m_imageBaseAddr = (JTextField) ReflectionHelpers.getField(ReflectionHelpers.getField(m_component, "m_debuggerPanel"), "m_imageBaseAddr");
    m_debuggerCombo = (CDebuggerComboBox) ReflectionHelpers.getField(ReflectionHelpers.getField(m_component, "m_debuggerPanel"), "m_debuggerCombo");
}
Also used : CProject(com.google.security.zynamics.binnavi.disassembly.CProject) JTree(javax.swing.JTree) DebuggerTemplate(com.google.security.zynamics.binnavi.debug.debugger.DebuggerTemplate) ArrayList(java.util.ArrayList) MockDatabase(com.google.security.zynamics.binnavi.Database.MockClasses.MockDatabase) CModuleContainer(com.google.security.zynamics.binnavi.disassembly.Modules.CModuleContainer) CModule(com.google.security.zynamics.binnavi.disassembly.Modules.CModule) Date(java.util.Date) CAddress(com.google.security.zynamics.zylib.disassembly.CAddress) CModuleOverviewPanel(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Module.Component.CModuleOverviewPanel) Before(org.junit.Before)

Aggregations

MockDatabase (com.google.security.zynamics.binnavi.Database.MockClasses.MockDatabase)1 CModuleOverviewPanel (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Module.Component.CModuleOverviewPanel)1 DebuggerTemplate (com.google.security.zynamics.binnavi.debug.debugger.DebuggerTemplate)1 CProject (com.google.security.zynamics.binnavi.disassembly.CProject)1 CModule (com.google.security.zynamics.binnavi.disassembly.Modules.CModule)1 CModuleContainer (com.google.security.zynamics.binnavi.disassembly.Modules.CModuleContainer)1 CAddress (com.google.security.zynamics.zylib.disassembly.CAddress)1 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 JTree (javax.swing.JTree)1 Before (org.junit.Before)1