use of com.google.security.zynamics.binnavi.disassembly.IRawModuleListener in project binnavi by google.
the class CRawModuleTest method testCRawModule_1.
@Test
public void testCRawModule_1() {
final MockSqlProvider sqlProvider = new MockSqlProvider();
final MockDatabase mockDatabase = new MockDatabase(sqlProvider);
try {
@SuppressWarnings("unused") final CRawModule rawModule = new CRawModule(0, null, 0, false, null);
fail();
} catch (final IllegalArgumentException e) {
}
try {
@SuppressWarnings("unused") final CRawModule rawModule = new CRawModule(23, null, 0, false, null);
fail();
} catch (final NullPointerException e) {
}
try {
@SuppressWarnings("unused") final CRawModule rawModule = new CRawModule(23, "rawModule", 0, false, null);
fail();
} catch (final NullPointerException e) {
}
try {
@SuppressWarnings("unused") final CRawModule rawModule = new CRawModule(23, "rawModule", 1, false, null);
fail();
} catch (final NullPointerException e) {
}
final CRawModule rawModule = new CRawModule(23, "rawModule", 1, false, sqlProvider);
@SuppressWarnings("unused") final IRawModuleListener listener;
assertEquals(1, rawModule.getFunctionCount());
assertEquals(23, rawModule.getId());
assertEquals("rawModule", rawModule.getName());
assertTrue(rawModule.inSameDatabase(sqlProvider));
assertTrue(rawModule.inSameDatabase(mockDatabase));
assertFalse(rawModule.isComplete());
}
Aggregations