EntireFileHistoryDialogModel extends FileHistoryDialogModel { public FileDifferenceModel getDifferenceModel() { return new EntireFileDifferenceModel(myGateway, getLeftEntry(), getRightEntry(), isCurrentRevisionSelected()); } EntireFileHistoryDialogModel(IdeaGateway gw, LocalVcs vcs, VirtualFile f); FileDifferenceModel getDifferenceModel();  }
@Test public void testDifferenceModelTitles() { vcs.createFile("old", cf(""), 123, false); vcs.rename("old", "new"); vcs.rename("new", "current"); initModelFor("current"); m.selectRevisions(1, 2); FileDifferenceModel dm = m.getDifferenceModel(); assertTrue(dm.getLeftTitle(new NullRevisionsProgress()).endsWith(" - old")); assertTrue(dm.getRightTitle(new NullRevisionsProgress()).endsWith(" - new")); }
@Test public void testTitleForCurrentRevision() { vcs.createFile("f", cf("content"), 123, false); initModelFor("f"); FileDifferenceModel dm = m.getDifferenceModel(); assertTrue(dm.getLeftTitle(new NullRevisionsProgress()).endsWith(" - f")); assertEquals("Current", dm.getRightTitle(new NullRevisionsProgress())); }