use of com.google.security.zynamics.binnavi.disassembly.INaviProject in project binnavi by google.
the class PostgreSQLProviderTest method testAddDebugger.
@Test
public void testAddDebugger() throws CouldntSaveDataException, CouldntLoadDataException {
final INaviProject project = getProvider().loadProjects().get(0);
getProvider().addDebugger(project, getProvider().loadDebuggers().getDebugger(0));
}
use of com.google.security.zynamics.binnavi.disassembly.INaviProject in project binnavi by google.
the class PostgreSQLProviderTest method testCSettingsFunctionsReadSettings23.
@Test(expected = NullPointerException.class)
public void testCSettingsFunctionsReadSettings23() throws CouldntLoadDataException {
final INaviProject project = getProvider().loadProjects().get(0);
PostgreSQLSettingsFunctions.readSetting((AbstractSQLProvider) getProvider(), project, null);
}
use of com.google.security.zynamics.binnavi.disassembly.INaviProject in project binnavi by google.
the class PostgreSQLProviderTest method testCProjectFunctionsgetViewsWithAddresses1.
@Test
public void testCProjectFunctionsgetViewsWithAddresses1() throws CouldntLoadDataException, LoadCancelledException {
final INaviProject project = getProvider().loadProjects().get(0);
project.load();
final IFilledList<UnrelocatedAddress> addresses = new FilledList<UnrelocatedAddress>();
List<INaviView> views = PostgreSQLProjectFunctions.getViewsWithAddresses((AbstractSQLProvider) getProvider(), project, addresses, true);
assertEquals(0, views.size());
addresses.add(new UnrelocatedAddress(new CAddress(0x10033DCL)));
views = PostgreSQLProjectFunctions.getViewsWithAddresses((AbstractSQLProvider) getProvider(), project, addresses, true);
assertEquals(0, views.size());
addresses.add(new UnrelocatedAddress(new CAddress(0x1003429)));
views = PostgreSQLProjectFunctions.getViewsWithAddresses((AbstractSQLProvider) getProvider(), project, addresses, true);
assertEquals(0, views.size());
views = PostgreSQLProjectFunctions.getViewsWithAddresses((AbstractSQLProvider) getProvider(), project, addresses, false);
assertEquals(0, views.size());
}
use of com.google.security.zynamics.binnavi.disassembly.INaviProject in project binnavi by google.
the class PostgreSQLProviderTest method testGetViewsWithAddress_Project1.
@Test
public void testGetViewsWithAddress_Project1() throws CouldntLoadDataException, LoadCancelledException {
final INaviProject project = getProvider().loadProjects().get(0);
project.load();
assertEquals(0, getProvider().getViewsWithAddress(project, Lists.newArrayList(new UnrelocatedAddress(new CAddress(0x01002B69))), true).size());
}
use of com.google.security.zynamics.binnavi.disassembly.INaviProject in project binnavi by google.
the class PostgreSQLViewNotificationParserTest method testProjectViewInform3.
@Test
public void testProjectViewInform3() throws CouldntLoadDataException {
final INaviProject project = new MockProject(provider);
final int currentUserViewSize = project.getContent().getViews().size();
final ViewNotificationContainer container = new ViewNotificationContainer(view.getConfiguration().getId(), Optional.fromNullable(view), Optional.of(project.getConfiguration().getId()), Optional.<INaviModule>absent(), Optional.of(project), "INSERT");
final PostgreSQLViewNotificationParser parser = new PostgreSQLViewNotificationParser();
parser.inform(Lists.<ViewNotificationContainer>newArrayList(container), provider);
assertEquals(currentUserViewSize + 1, project.getContent().getViews().size());
final ViewNotificationContainer container2 = new ViewNotificationContainer(view.getConfiguration().getId(), Optional.fromNullable(view), Optional.of(project.getConfiguration().getId()), Optional.<INaviModule>absent(), Optional.of(project), "DELETE");
parser.inform(Lists.<ViewNotificationContainer>newArrayList(container2), provider);
assertEquals(currentUserViewSize, project.getContent().getViews().size());
}
Aggregations