Esempio n. 1
0
  protected void setUp() throws Exception {
    super.setUp();

    // SimpleLogger.initFileLogging(System.getProperty("user.dir") + "/juxta.log");
    SimpleLogger.initConsoleLogging();
    // SimpleLogger.setLoggingLevel(DiffAlgorithm.VERBOSE_LOGGING);
    log = new DebugLogger(System.getProperty("user.dir") + "/TestMoves.log");

    WriteFile(
        file1,
        "da fust line\nan' da secunt line\n3\nNow is the time for the fourth line\nfinally, the lassed line\nPsych! actually there is another line at the end.\n");
    WriteFile(
        file2,
        "da first line\nfinally, the last line\nan' da secunt line\n33\nNow is the tine for the forth line\nPsych! actually there is another line at the end.\n");
    WriteFile(
        file3,
        "first line\nan' da secunt line\n33\nfinally, the last line\nNow is the time for the fourth line\nPsych! actually there is another line at the end.\n");
    WriteFile(
        file4,
        "da fust line\nan' da secunt line\n3\nNow is the time for the fourth line\nfinally, the lassed line\n");
    WriteFile(
        file5,
        "da first line\nfinally, the last line\nan' da secunt line\n33\nNow is the tine for the forth line\n");
    WriteFile(
        file6,
        "From the fixt lull of heaven, she saw\nTime, like a pulse, shake fierce\nThrough all the worlds. Her gaze still strove,\nIn that steep gulph, to pierce\nThe swarm: and then she spake, as when\nThe stars sang in their spheres.\n\n�I wish that he were come to me,\nFor he will come,� she said.\n�Have I not prayed in solemn heaven?\nOn earth, has he not prayed?\nAre not two prayers a perfect strength?\nAnd shall I feel afraid?\n\n�When round his head the aureole clings,\nAnd he is clothed in white,\nI'll take his hand, and go with him\nTo the deep wells of light,\nAnd we will step down as to a stream\nAnd bathe there in God's sight.\n");
    WriteFile(
        file7,
        "From the fixed place of Heaven she saw\n Time like a pulse shake fierce\nThrough all the worlds. Her gaze still strove\n Within the gulf to pierce\nIts path; and now she spoke as when\n The stars sang in their spheres.\n\nThe sun was gone now; the curled moon\n Was like a little feather\nFluttering far down the gulf; and now\n She spoke through the still weather.\nHer voice was like the voice the stars\n Had when they sang together.\n\n(Ah sweet! Even now, in that bird's song,\n Strove not her accents there,\nFain to be hearkened? When those bells\n Possessed the mid-day air,\nStrove not her steps to reach my side\n Down all the echoing stair?)\n\n�I wish that he were come to me,\n For he will come,� she said.\n�Have I not prayed in Heaven?�on earth,\n Lord, Lord, has he not pray'd?\nAre not two prayers a perfect strength?\n And shall I feel afraid?\n\n�When round his head the aureole clings,\n And he is clothed in white,\nI'll take his hand and go with him\n To the deep wells of light;\nWe will step down as to a stream,\n And bathe there in God's sight\n");

    try {
      documentManager = new DocumentManager(null);
      DocumentManagerAccess.getInstance().setDocumentManager(documentManager);
      documentManager.loadManifest();

      comparisonSet = new ComparisonSet(documentManager, false);
      movesManager = documentManager.getMovesManager();
      movesManager.addListener(comparisonSet);

      // LinkedList documentList = documentManager.getUncollatedDocuments();

      addDoc(file1);
      addDoc(file2);
    } catch (LoggedException e) {
      e.printStackTrace();
      fail();
    }
  }