use of com.google.security.zynamics.binnavi.disassembly.INaviProject in project binnavi by google.
the class PostgreSQLViewNotificationParserTest method testProjectViewInform1.
@Test
public void testProjectViewInform1() throws CouldntLoadDataException {
final INaviProject project = new MockProject(provider);
final ViewNotificationContainer container = new ViewNotificationContainer(view.getConfiguration().getId(), Optional.fromNullable(view), Optional.of(project.getConfiguration().getId()), Optional.<INaviModule>absent(), Optional.of(project), "UPDATE");
final PostgreSQLViewNotificationParser parser = new PostgreSQLViewNotificationParser();
parser.inform(Lists.<ViewNotificationContainer>newArrayList(container), provider);
}
use of com.google.security.zynamics.binnavi.disassembly.INaviProject in project binnavi by google.
the class PostgreSQLProviderTest method testCSettingsFunctionsWriteSettings24.
@Test(expected = NullPointerException.class)
public void testCSettingsFunctionsWriteSettings24() throws CouldntLoadDataException, CouldntSaveDataException {
final INaviProject project = getProvider().loadProjects().get(0);
PostgreSQLSettingsFunctions.writeSetting((AbstractSQLProvider) getProvider(), project, "key", null);
}
use of com.google.security.zynamics.binnavi.disassembly.INaviProject in project binnavi by google.
the class PostgreSQLProviderTest method testGetViewsWithAddress_Project3.
@Test(expected = NullPointerException.class)
public void testGetViewsWithAddress_Project3() throws CouldntLoadDataException {
final INaviProject project = getProvider().loadProjects().get(0);
getProvider().getViewsWithAddress(project, null, true);
}
use of com.google.security.zynamics.binnavi.disassembly.INaviProject in project binnavi by google.
the class PostgreSQLProviderTest method testCProjectFunctionsSetName1.
@Test
public void testCProjectFunctionsSetName1() throws CouldntLoadDataException, CouldntSaveDataException {
final INaviProject project = getProvider().loadProjects().get(0);
PostgreSQLProjectFunctions.setName((AbstractSQLProvider) getProvider(), project, "foobar");
}
use of com.google.security.zynamics.binnavi.disassembly.INaviProject in project binnavi by google.
the class PostgreSQLProviderTest method testTraceFunctionsDeleteTrace1.
@Test
public void testTraceFunctionsDeleteTrace1() throws CouldntLoadDataException, LoadCancelledException, CouldntDeleteException, CouldntSaveDataException {
final CProject project = getProvider().createProject("SOME_NEW_PROJECT");
getProvider().createTrace(project, "SOME_TRACE_NAME_ONE", "SOME_TRACE_DESCRIPTION_ONE");
getProvider().createTrace(project, "SOME_TRACE_NAME_TWO", "SOME_TRACE_DESCRIPTION_TWO");
project.load();
final int projectTraceCount = project.getContent().getTraceCount();
assertEquals(2, projectTraceCount);
PostgreSQLTraceFunctions.deleteTrace((AbstractSQLProvider) getProvider(), project.getContent().getTraces().get(0));
project.close();
final List<INaviProject> projects = getProvider().loadProjects();
INaviProject project2 = null;
for (final INaviProject cProject : projects) {
if (cProject.getConfiguration().getId() == project.getConfiguration().getId()) {
project2 = cProject;
}
}
project2.load();
assertEquals(projectTraceCount - 1, project2.getContent().getTraceCount());
}
Aggregations