use of com.google.security.zynamics.binnavi.Database.PostgreSQL.Notifications.containers.InstructionCommentNotificationContainer in project binnavi by google.
the class PostgreSQLNotificationParserTest method testGlobalInstructionCommentParsingAppend.
@Test
public void testGlobalInstructionCommentParsingAppend() {
new MockModule(provider, Lists.newArrayList(mockView), Lists.newArrayList(mockFunction));
MockPGNotification notification = new MockPGNotification("comment_changes", "bn_instructions UPDATE 1 4608 3333");
final CommentNotification result = PostgreSQLCommentNotificationParser.processInstructionGlobalCommentNotification(notification, provider);
assertNotNull(result);
final InstructionCommentNotificationContainer container = (InstructionCommentNotificationContainer) result;
final INaviInstruction instruction = container.getInstruction();
assertEquals(new CAddress(4608), instruction.getAddress());
assertEquals(CommentOperation.APPEND, container.getOperation());
assertEquals(new Integer(3333), container.getCommentId());
assertEquals(CommentScope.GLOBAL, container.getScope());
}
Aggregations