Package org.evolizer.versioncontrol.cvs.model.entities

Examples of org.evolizer.versioncontrol.cvs.model.entities.Revision


    Directory d1 = new Directory("/foo/subDir", null);
    Directory d2 = new Directory("/foo/subDir", null);
    Directory d3 = new Directory("/foo/subDir2", null);
   
    assertEquals(false, d1.equals(null));
    assertEquals(false, d1.equals(new Revision("1.1")));
   
    assertEquals(true, d1.equals(d2));
    assertEquals(false, d1.equals(d3));
   
    assertEquals(d1.hashCode(), d2.hashCode());
View Full Code Here


 
  @Test
  public void testFileEqualsAndHashCode(){
    VersionedFile f1 = new VersionedFile("/foo/File.java", null);
    assertEquals(false, f1.equals(null));
    assertEquals(false, f1.equals(new Revision("1.1")));
   
    VersionedFile f2 = new VersionedFile("/foo/File.java", null);
   
    assertEquals(true, f1.equals(f2));
    assertEquals(true, f1.hashCode()==f2.hashCode());
View Full Code Here

    b1.addChild(c1);
    assertEquals(false, b1.equals(b2));
    b2.addChild(c1);
    assertEquals(true, b1.equals(b2));
   
    Revision rev = new Revision("1.1");
    b1.addRevision(rev);
    assertEquals(false, b1.equals(b2));
    b2.addRevision(rev);
    assertEquals(true, b1.equals(b2));
    assertEquals(true, b1.hashCode()==b2.hashCode());
View Full Code Here

    assertTrue(m1.hashCode()==m2.hashCode());
  }
 
  @Test
  public void testRevisionEqualsAndHashCode(){
    Revision rev1 = new Revision("1.1");
    Revision rev2 = new Revision("1.1");
   
    VersionedFile file = new VersionedFile("foo.bar", null);
    ModificationReport modRe = new ModificationReport();
   
    rev1.setFile(file);
    rev2.setFile(file);
   
    rev1.setReport(modRe);
    rev2.setReport(modRe);
   
    rev1.setState("active");
    rev2.setState("active");
   
    assertFalse(rev1.equals(null));
    assertFalse(rev1.equals(new Object()));
    assertTrue(rev1.equals(rev1));
    assertTrue(rev1.equals(rev2));
    assertTrue(rev1.hashCode()==rev2.hashCode());
   
    rev2.setNumber("1.2");
    assertFalse(rev1.equals(rev2));
  }
View Full Code Here

    fSessionHandler.dropSchema(fDBUrl, fDBDialect, fDBDriverName, fDBUser, fDBPasswd);
    fSessionHandler = null;
  }
 
  private void createRevisions() throws ParseException {
    rev1 = new Revision("1.2");
    rev1.setCreationTime("1980/10/03 12:00:00"); //yyyy/MM/dd HH:mm:ss
    rev1.addNicknameToAuthor("mwuersch");
    rev1.setCommitMessage("mimimi");
   
    rev2 = new Revision("1.3");
    rev2.setCreationTime("1980/10/03 12:02:00");
    rev2.addNicknameToAuthor("mwuersch");
    rev2.setCommitMessage("mimimi");
   
    rev3 = new Revision("1.4");
    rev3.setCreationTime("1980/10/03 12:02:01");
    rev3.addNicknameToAuthor("mwuersch");
    rev3.setCommitMessage("mimimi");
   
    rev4 = new Revision("1.44");
    rev4.setCreationTime("1980/10/03 12:04:00");
    rev4.addNicknameToAuthor("mwuersch");
    rev4.setCommitMessage("mimimi");
   
    rev5 = new Revision("1.6");
    rev5.setCreationTime("1980/10/03 12:05:00");
    rev5.addNicknameToAuthor("mwuersch");
    rev5.setCommitMessage("mimimi");
   
    try {
View Full Code Here

  }
 
  @Test
  public void testReleaseEqualsAndHashCode(){
    Date date = new Date();
    Revision rev1 = new Revision("1.1");
    Revision rev2 = new Revision("1.2");
    Release r1 = new Release("name");
    Release r2 = new Release("name");
   
    r1.setTimeStamp(date);
    r2.setTimeStamp(date);
View Full Code Here

    assertEquals(3, fileCount);
  }
 
  @Test
  public void testSampleRevision1() throws ParseException{
    Revision revision = fSession.uniqueResult("select revision from Revision as revision " +
                      "join revision.file as file " +
                      "where file.path like '%nsViewportFrame.cpp' " +
                      "and revision.number='1.63'", Revision.class);

    SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");

        Date date = df.parse("2003/02/22 20:13:12");
   
    assertEquals(date, revision.getCreationTime());
    assertTrue(revision.getAuthor().getNickNames().contains("bzbarsky%mit.edu"));
    assertEquals("bzbarsky%mit.edu", revision.getAuthorNickName());
    assertEquals("Exp", revision.getState());
    assertEquals(39, revision.getLinesAdd());
    assertEquals(47, revision.getLinesDel());
    assertEquals("Reflow main content before reflowing fixed-pos frames so that the placeholders\nare in the right places.  Bug 90270 and dependencies.  r+sr=roc+moz", revision.getCommitMessage())
    //TODO Add some tests for other revisions.
  }
View Full Code Here

        SVNRelease rel = getRelease("httpunit_1_2_2");
        assertEquals("Release " + rel.getName() + " was not created with its real date", sDateFormat.parse(
        "2001-02-21 20:01:07 +0100").toString(), rel.getTimeStamp().toString());Set<Revision> revisions = ((SVNRelease) rel).getReleaseRevisions();
        int versionsCount = 0;
        for (Revision tempVer : revisions) {
            Revision ver = ((SVNRevision) tempVer).getAncestor();
            if (ver.getState() == null) {
                versionsCount++;
            }
        }
        assertEquals("Wrong number of FileVersions for release " + rel.getName(), 71, versionsCount);
View Full Code Here

    //TODO Add some tests for other revisions.
  }
 
  @Test
  public void testSampleRevision2() throws ParseException{
    Revision revision = fSession.uniqueResult("select revision from Revision as revision " +
                      "join revision.file as file " +
                      "where file.path like '%nsViewportFrame.cpp' " +
                      "and revision.number='1.75.6.4'", Revision.class);

    SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");

        Date date = df.parse("2005/05/14 00:12:21");
   
    assertEquals(date, revision.getCreationTime());
    assertTrue(revision.getAuthor().getNickNames().contains("dbaron%dbaron.org"));
    assertEquals("Exp", revision.getState());
    assertEquals(18, revision.getLinesAdd());
    assertEquals(0, revision.getLinesDel());
    assertEquals("ViewportFrame does need GetMinWidth/GetPrefWidth.", revision.getCommitMessage())
  }
View Full Code Here

    assertEquals("ViewportFrame does need GetMinWidth/GetPrefWidth.", revision.getCommitMessage())
  }
 
  @Test
  public void testSampleRevision3() throws ParseException{
    Revision revision = fSession.uniqueResult("select revision from Revision as revision " +
                      "join revision.file as file " +
                      "where file.path like '%nsViewportFrame.cpp' " +
                      "and revision.number='1.1'", Revision.class);

    SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");

        Date date = df.parse("1999/01/24 20:36:46");
   
    assertEquals(date, revision.getCreationTime());
    assertTrue(revision.getAuthor().getNickNames().contains("troy%netscape.com"));
    assertEquals("Exp", revision.getState());
    assertEquals(0, revision.getLinesAdd());
    assertEquals(0, revision.getLinesDel());
    assertEquals("Initial check-in", revision.getCommitMessage())
  }
View Full Code Here

TOP

Related Classes of org.evolizer.versioncontrol.cvs.model.entities.Revision

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.