コード例 #1
0
 @Override
 public void setUp() throws Exception {
   super.setUp();
   baseDir = FileUtils.getTempFileAt(new File("."), "data_temp_additional_info_integrity_test");
   if (baseDir.exists()) {
     FileUtils.deleteDirectoryTree(baseDir);
   }
   baseDir.mkdir();
 }
コード例 #2
0
  public void testIntegrityInModuleHasNoFile() throws MisconfigurationException {
    IntegrityInfo info = AdditionalInfoIntegrityChecker.checkIntegrity(nature, monitor, false);
    assertTrue(info.desc.toString(), info.allOk);

    File f = FileUtils.getTempFileAt(baseDir, "integrity_no_file", ".py");
    FileUtils.writeStrToFile("", f);
    addFooModule(new Module(new stmtType[0]), f);
    info = AdditionalInfoIntegrityChecker.checkIntegrity(nature, monitor, false);
    assertFalse(info.allOk);
    assertEquals(1, info.modulesNotInDisk.size());
    assertEquals(info.modulesNotInDisk.get(0), new ModulesKey("foo", null));

    fixAndCheckAllOk(info);
  }