Example #1
0
  @Test
  public void shouldBeAbleToCreateEpatch() throws Exception {
    // given
    JavaToEMFParser parser = new JavaToEMFParser();
    // when
    ResourceSet rs = parser.parseAllJavaFiles(new File("res/in/emfcomparebug"), new Vector<File>());
    List<Resource> resources = extractParsedClasses(rs);

    ModelComparator comparator = new ModelComparator();
    DiffModel diffModel =
        comparator.compare(
            resources.get(0).getContents().get(0), resources.get(1).getContents().get(0));
    ModelUtil.describeDiff(diffModel.getOwnedElements(), 0);
    // then this should succeed without throwing an exception
    Epatch epatch = comparator.getEpatch();
  }