use of com.google.security.zynamics.binnavi.models.Bookmarks.code.CCodeBookmarkManager in project binnavi by google.
the class CCodeBookmarkTableModelTest method test3setValueAtFail.
@Test
public void test3setValueAtFail() {
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));
try {
tableModel.setValueAt("working", 0, 1);
fail();
} catch (final IllegalArgumentException e) {
}
}
use of com.google.security.zynamics.binnavi.models.Bookmarks.code.CCodeBookmarkManager 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.models.Bookmarks.code.CCodeBookmarkManager 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());
}
Aggregations