Search in sources :

Example 1 with CCrossReference

use of com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReference in project binnavi by google.

the class CCrossReferenceTest method test1Simple.

@Test
public void test1Simple() {
    final CCrossReference reference = new CCrossReference(new MockFunction(), new MockFunction());
    final CCrossReference reference2 = new CCrossReference(new MockFunction(), new MockFunction());
    assertFalse(reference.equals(reference2));
    assertTrue(reference.equals(reference));
}
Also used : CCrossReference(com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReference) MockFunction(com.google.security.zynamics.binnavi.disassembly.MockFunction) Test(org.junit.Test)

Example 2 with CCrossReference

use of com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReference in project binnavi by google.

the class CCrossReferencesModelTest method test4getRowCount.

@Test
public void test4getRowCount() {
    final CCrossReferencesModel model = new CCrossReferencesModel();
    final CCrossReference reference = new CCrossReference(new MockFunction(), new MockFunction());
    final List<CCrossReference> crossReferences = new ArrayList<CCrossReference>();
    crossReferences.add(reference);
    model.setCrossReferences(crossReferences);
    assertEquals(1, model.getRowCount());
}
Also used : CCrossReference(com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReference) MockFunction(com.google.security.zynamics.binnavi.disassembly.MockFunction) ArrayList(java.util.ArrayList) CCrossReferencesModel(com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReferencesModel) Test(org.junit.Test)

Example 3 with CCrossReference

use of com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReference in project binnavi by google.

the class CCrossReferenceTest method test2getCalledFunction.

@Test
public void test2getCalledFunction() {
    final MockFunction function = new MockFunction();
    final CCrossReference reference = new CCrossReference(function, function);
    assertEquals(function, reference.getCalledFunction());
    assertEquals(function, reference.getCallingFunction());
}
Also used : MockFunction(com.google.security.zynamics.binnavi.disassembly.MockFunction) CCrossReference(com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReference) Test(org.junit.Test)

Example 4 with CCrossReference

use of com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReference in project binnavi by google.

the class CCrossReferencesModelTest method test5ValueAt.

@Test
public void test5ValueAt() {
    final CCrossReferencesModel model = new CCrossReferencesModel();
    final CCrossReference reference = new CCrossReference(new MockFunction(), new MockFunction());
    final List<CCrossReference> crossReferences = new ArrayList<CCrossReference>();
    crossReferences.add(reference);
    model.setCrossReferences(crossReferences);
    assertEquals("Mock Function", model.getValueAt(0, 0));
    assertEquals("Mock Function", model.getValueAt(0, 1));
}
Also used : CCrossReference(com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReference) MockFunction(com.google.security.zynamics.binnavi.disassembly.MockFunction) ArrayList(java.util.ArrayList) CCrossReferencesModel(com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReferencesModel) Test(org.junit.Test)

Example 5 with CCrossReference

use of com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReference in project binnavi by google.

the class CCrossReferencesModelTest method test1Simple.

@Test
public void test1Simple() {
    final CCrossReferencesModel model = new CCrossReferencesModel();
    final CCrossReference reference = new CCrossReference(new MockFunction(), new MockFunction());
    final List<CCrossReference> crossReferences = new ArrayList<CCrossReference>();
    crossReferences.add(reference);
    model.setCrossReferences(crossReferences);
}
Also used : CCrossReference(com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReference) MockFunction(com.google.security.zynamics.binnavi.disassembly.MockFunction) ArrayList(java.util.ArrayList) CCrossReferencesModel(com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReferencesModel) Test(org.junit.Test)

Aggregations

CCrossReference (com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReference)7 MockFunction (com.google.security.zynamics.binnavi.disassembly.MockFunction)7 Test (org.junit.Test)7 CCrossReferencesModel (com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReferencesModel)5 ArrayList (java.util.ArrayList)5