Search in sources :

Example 26 with CTagManager

use of com.google.security.zynamics.binnavi.Tagging.CTagManager in project binnavi by google.

the class PostgreSQLProviderTest method testCTagFunctionsMoveTag3.

@Test(expected = NullPointerException.class)
public void testCTagFunctionsMoveTag3() throws CouldntSaveDataException, CouldntLoadDataException {
    final CTagManager tagManager = getProvider().loadTagManager(TagType.VIEW_TAG);
    tagManager.addTag(tagManager.getRootTag(), "Node Tag I");
    final ITreeNode<CTag> tag1 = tagManager.getRootTag().getChildren().get(0);
    PostgreSQLTagFunctions.moveTag((AbstractSQLProvider) getProvider(), tag1, null, null);
}
Also used : CTag(com.google.security.zynamics.binnavi.Tagging.CTag) CTagManager(com.google.security.zynamics.binnavi.Tagging.CTagManager) ExpensiveBaseTest(com.google.security.zynamics.binnavi.disassembly.types.ExpensiveBaseTest) Test(org.junit.Test)

Example 27 with CTagManager

use of com.google.security.zynamics.binnavi.Tagging.CTagManager in project binnavi by google.

the class PostgreSQLProviderTestSetup method testCreateTag3.

@Test(expected = NullPointerException.class)
public void testCreateTag3() throws CouldntSaveDataException, CouldntLoadDataException {
    final CTagManager tagManager = getProvider().loadTagManager(TagType.VIEW_TAG);
    getProvider().createTag(tagManager.getRootTag().getObject(), "Tag Name", null, TagType.VIEW_TAG);
}
Also used : CTagManager(com.google.security.zynamics.binnavi.Tagging.CTagManager) ExpensiveBaseTest(com.google.security.zynamics.binnavi.disassembly.types.ExpensiveBaseTest) Test(org.junit.Test)

Example 28 with CTagManager

use of com.google.security.zynamics.binnavi.Tagging.CTagManager in project binnavi by google.

the class PostgreSQLProviderTestSetup method testCreateTag2.

@Test(expected = NullPointerException.class)
public void testCreateTag2() throws CouldntSaveDataException, CouldntLoadDataException {
    final CTagManager tagManager = getProvider().loadTagManager(TagType.VIEW_TAG);
    getProvider().createTag(tagManager.getRootTag().getObject(), null, "Tag Description", TagType.VIEW_TAG);
}
Also used : CTagManager(com.google.security.zynamics.binnavi.Tagging.CTagManager) ExpensiveBaseTest(com.google.security.zynamics.binnavi.disassembly.types.ExpensiveBaseTest) Test(org.junit.Test)

Example 29 with CTagManager

use of com.google.security.zynamics.binnavi.Tagging.CTagManager in project binnavi by google.

the class PostgreSQLProviderTestSetup method testCreateTag4.

@Test(expected = NullPointerException.class)
public void testCreateTag4() throws CouldntSaveDataException, CouldntLoadDataException {
    final CTagManager tagManager = getProvider().loadTagManager(TagType.VIEW_TAG);
    getProvider().createTag(tagManager.getRootTag().getObject(), "Tag Name", "Tag Description", null);
}
Also used : CTagManager(com.google.security.zynamics.binnavi.Tagging.CTagManager) ExpensiveBaseTest(com.google.security.zynamics.binnavi.disassembly.types.ExpensiveBaseTest) Test(org.junit.Test)

Example 30 with CTagManager

use of com.google.security.zynamics.binnavi.Tagging.CTagManager in project binnavi by google.

the class PostgreSQLProviderTest method testSetDescription11.

@Test(expected = NullPointerException.class)
public void testSetDescription11() throws CouldntLoadDataException, CouldntSaveDataException {
    final CTagManager tagManager = getProvider().loadTagManager(TagType.VIEW_TAG);
    final ITreeNode<CTag> tag = tagManager.getRootTag().getChildren().get(0);
    getProvider().setDescription(tag.getObject(), null);
}
Also used : CTag(com.google.security.zynamics.binnavi.Tagging.CTag) CTagManager(com.google.security.zynamics.binnavi.Tagging.CTagManager) ExpensiveBaseTest(com.google.security.zynamics.binnavi.disassembly.types.ExpensiveBaseTest) Test(org.junit.Test)

Aggregations

CTagManager (com.google.security.zynamics.binnavi.Tagging.CTagManager)46 CTag (com.google.security.zynamics.binnavi.Tagging.CTag)34 Test (org.junit.Test)31 ExpensiveBaseTest (com.google.security.zynamics.binnavi.disassembly.types.ExpensiveBaseTest)23 MockSqlProvider (com.google.security.zynamics.binnavi.Database.MockClasses.MockSqlProvider)17 Tree (com.google.security.zynamics.zylib.types.trees.Tree)15 MockDatabase (com.google.security.zynamics.binnavi.Database.MockClasses.MockDatabase)13 CModule (com.google.security.zynamics.binnavi.disassembly.Modules.CModule)13 INaviModule (com.google.security.zynamics.binnavi.disassembly.INaviModule)12 CAddress (com.google.security.zynamics.zylib.disassembly.CAddress)12 Date (java.util.Date)12 TreeNode (com.google.security.zynamics.zylib.types.trees.TreeNode)10 Before (org.junit.Before)9 TagManager (com.google.security.zynamics.binnavi.API.disassembly.TagManager)8 ITreeNode (com.google.security.zynamics.zylib.types.trees.ITreeNode)8 Database (com.google.security.zynamics.binnavi.API.disassembly.Database)7 CView (com.google.security.zynamics.binnavi.disassembly.views.CView)7 Module (com.google.security.zynamics.binnavi.API.disassembly.Module)6 MockTagManager (com.google.security.zynamics.binnavi.Tagging.MockTagManager)5 MockView (com.google.security.zynamics.binnavi.disassembly.MockView)5