コード例 #1
0
ファイル: Version.java プロジェクト: negabaro/alfresco
 public synchronized boolean equals(java.lang.Object obj) {
   if (!(obj instanceof Version)) return false;
   Version other = (Version) obj;
   if (obj == null) return false;
   if (this == obj) return true;
   if (__equalsCalc != null) {
     return (__equalsCalc == obj);
   }
   __equalsCalc = obj;
   boolean _equals;
   _equals =
       true
           && ((this.id == null && other.getId() == null)
               || (this.id != null && this.id.equals(other.getId())))
           && ((this.created == null && other.getCreated() == null)
               || (this.created != null && this.created.equals(other.getCreated())))
           && ((this.creator == null && other.getCreator() == null)
               || (this.creator != null && this.creator.equals(other.getCreator())))
           && ((this.label == null && other.getLabel() == null)
               || (this.label != null && this.label.equals(other.getLabel())))
           && this.major == other.isMajor()
           && ((this.commentaries == null && other.getCommentaries() == null)
               || (this.commentaries != null
                   && java.util.Arrays.equals(this.commentaries, other.getCommentaries())));
   __equalsCalc = null;
   return _equals;
 }
コード例 #2
0
ファイル: IssueTest.java プロジェクト: RG9/jira-client
  @Test
  public void testGetVersion() {
    Issue issue = new Issue(null, Utils.getTestIssue());
    List<Version> versions = issue.getFixVersions();

    assertNotNull(versions);
    assertEquals(versions.size(), 1);

    Version version = versions.get(0);

    Assert.assertEquals(version.getId(), "10200");
    Assert.assertEquals(version.getName(), "1.0");
    assertFalse(version.isArchived());
    assertFalse(version.isReleased());
    Assert.assertEquals(version.getReleaseDate(), "2013-12-01");
    Assert.assertEquals(version.getDescription(), "First Full Functional Build");
  }