use of com.google.security.zynamics.binnavi.disassembly.INaviModule in project binnavi by google.
the class PostgreSQLProviderTest method testCModuleFunctionsgetViewsWithAddresses4.
@Test(expected = NullPointerException.class)
public void testCModuleFunctionsgetViewsWithAddresses4() throws CouldntLoadDataException {
final INaviModule module = getProvider().loadModules().get(0);
PostgreSQLModuleFunctions.getViewsWithAddresses((AbstractSQLProvider) getProvider(), module, null, true);
}
use of com.google.security.zynamics.binnavi.disassembly.INaviModule in project binnavi by google.
the class PostgreSQLProviderTest method testTraceFunctionsSave1.
@Test
public void testTraceFunctionsSave1() throws CouldntLoadDataException, LoadCancelledException, CouldntSaveDataException {
final INaviProject project = getProvider().createProject("SOME_PROJECT");
getProvider().createTrace(project, "SOME_TRACE", "SOME_TRACE_DESCRIPTION");
project.load();
final TraceList trace = project.getContent().getTraces().get(0);
final INaviModule module = getProvider().loadModules().get(0);
module.load();
final long tid = 0x1L;
final UnrelocatedAddress address2 = new UnrelocatedAddress(new CAddress(0x1234));
final BreakpointAddress address = new BreakpointAddress(module, address2);
final TraceEventType type = TraceEventType.ECHO_BREAKPOINT;
final List<TraceRegister> values = new ArrayList<>();
final ITraceEvent event = new TraceEvent(tid, address, type, values);
trace.addEvent(event);
trace.setDescription("burzelbarf");
PostgreSQLTraceFunctions.save((AbstractSQLProvider) getProvider(), trace);
project.close();
INaviProject project2 = null;
for (final INaviProject cProject : getProvider().loadProjects()) {
if (cProject.getConfiguration().getId() == project.getConfiguration().getId()) {
project2 = cProject;
}
}
getProvider().createTrace(project2, "SOME_TRACE_2", "SOME_TRACE_DESCRIPTION_2");
project2.load();
final TraceList trace2 = project2.getContent().getTraces().get(0);
assertEquals("burzelbarf", trace2.getDescription());
}
use of com.google.security.zynamics.binnavi.disassembly.INaviModule in project binnavi by google.
the class PostgreSQLProviderTest method testCTagFunctionsSetName.
@Test
public void testCTagFunctionsSetName() throws CouldntLoadDataException, CouldntSaveDataException, LoadCancelledException {
final CTagManager tagManager = getProvider().loadTagManager(TagType.VIEW_TAG);
tagManager.addTag(tagManager.getRootTag(), "Node Tag I");
tagManager.addTag(tagManager.getRootTag(), "Node Tag II");
tagManager.addTag(tagManager.getRootTag().getChildren().get(0), "Node Tag III");
final ITreeNode<CTag> tag1 = tagManager.getRootTag().getChildren().get(0);
final INaviModule module = getProvider().loadModules().get(0);
module.load();
PostgreSQLTagFunctions.setName((AbstractSQLProvider) getProvider(), tag1.getObject(), "foobar");
module.close();
final INaviModule module2 = getProvider().loadModules().get(0);
module2.load();
final CTagManager tagManager1 = getProvider().loadTagManager(TagType.VIEW_TAG);
assertEquals("foobar", tagManager1.getRootTag().getChildren().get(0).getObject().getName());
}
use of com.google.security.zynamics.binnavi.disassembly.INaviModule in project binnavi by google.
the class PostgreSQLProviderTest method testCViewFunctionsUntagView2.
@Test(expected = NullPointerException.class)
public void testCViewFunctionsUntagView2() throws CouldntSaveDataException, CouldntLoadDataException {
final INaviModule module = getProvider().loadModules().get(0);
final CView view = (CView) module.getContent().getViewContainer().getViews().get(224);
getProvider().removeTag(view, null);
}
use of com.google.security.zynamics.binnavi.disassembly.INaviModule in project binnavi by google.
the class PostgreSQLProviderTest method testCDataFunctions1.
@Test
public void testCDataFunctions1() throws CouldntLoadDataException, LoadCancelledException {
final INaviModule module = getProvider().loadModules().get(0);
module.load();
PostgreSQLDataFunctions.loadData((AbstractSQLProvider) getProvider(), (CModule) module);
}
Aggregations