代码之家  ›  专栏  ›  技术社区  ›  tekumara

在Eclipse中的JUnit测试上调试断点不工作

  •  7
  • tekumara  · 技术社区  · 16 年前

    我正在尝试在Eclipse中调试JUnit测试,但是我的断点没有被触发(除非它们位于第一行或第二行)。

    我尝试删除并重新创建工作区中的所有断点,清理项目,创建新的调试配置,单独运行测试方法,并将其作为测试类的一部分与其他方法一起运行。但都无济于事:-(

     public void testLoadPatientsAndConvertToBeans() throws IOException, CDataGridException {
      File file = fileutil.getFileFromPrefsOrPrompt(basefileDef);
    
      CDataBuilder builder = new CDataDelimitedFileBuilder(file, 
        CDataDelimitedFileBuilder.DelimiterSettings.WINDOWS_CSV,
        basefileDef);
    
      // breakpoints placed on lines from here on do not fire
    
      CDataCacheContainer container = 
       cacheIO.construct(
         new CDataNarrower(
           cacheIO.construct(builder)
         ).setConvertMissing(true));
    
      assertEquals(13548, container.size());
    
      cacheIO.export(container, patients);
    
      Collection<Patient> pBeans = patients.getBeans();
    
      assertEquals(container.size(), pBeans.size());
    
      Patient patient = pBeans.iterator().next();
      Map props = patient.getPropertyMap();
    
      System.out.println(props);
     }
    
    2 回复  |  直到 9 年前
        2
  •  0
  •   Oscar Chan    16 年前