@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); Certification sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); Certification differentObject = getTestObject(); differentObject.setGUID("Different"); assertFalse(getTestObject().equals(differentObject)); }
@Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof Certification)) { return false; } if (!super.equals(objectToCompare)) { return false; } Certification that = (Certification) objectToCompare; return Objects.equals(getCertificateGUID(), that.getCertificateGUID()) && Objects.equals(getCertificationTypeName(), that.getCertificationTypeName()) && Objects.equals(getExaminer(), that.getExaminer()) && Objects.equals(getSummary(), that.getSummary()) && Objects.equals(getLink(), that.getLink()) && Objects.equals(getStartDate(), that.getStartDate()) && Objects.equals(getEndDate(), that.getEndDate()) && Objects.equals(getCertificationConditions(), that.getCertificationConditions()) && Objects.equals(getCreatedBy(), that.getCreatedBy()) && Objects.equals(getCustodian(), that.getCustodian()) && Objects.equals(getNotes(), that.getNotes()); }
Certification extends Referenceable { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof Certification)) { return false; } if (!super.equals(objectToCompare)) { return false; } Certification that = (Certification) objectToCompare; return Objects.equals(getCertificateGUID(), that.getCertificateGUID()) && Objects.equals(getCertificationTypeName(), that.getCertificationTypeName()) && Objects.equals(getExaminer(), that.getExaminer()) && Objects.equals(getSummary(), that.getSummary()) && Objects.equals(getLink(), that.getLink()) && Objects.equals(getStartDate(), that.getStartDate()) && Objects.equals(getEndDate(), that.getEndDate()) && Objects.equals(getCertificationConditions(), that.getCertificationConditions()) && Objects.equals(getCreatedBy(), that.getCreatedBy()) && Objects.equals(getCustodian(), that.getCustodian()) && Objects.equals(getNotes(), that.getNotes()); } }
Certification extends Referenceable { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof Certification)) { return false; } if (!super.equals(objectToCompare)) { return false; } Certification that = (Certification) objectToCompare; return Objects.equals(getCertificateGUID(), that.getCertificateGUID()) && Objects.equals(getCertificationTypeName(), that.getCertificationTypeName()) && Objects.equals(getExaminer(), that.getExaminer()) && Objects.equals(getSummary(), that.getSummary()) && Objects.equals(getLink(), that.getLink()) && Objects.equals(getStartDate(), that.getStartDate()) && Objects.equals(getEndDate(), that.getEndDate()) && Objects.equals(getCertificationConditions(), that.getCertificationConditions()) && Objects.equals(getCreatedBy(), that.getCreatedBy()) && Objects.equals(getCustodian(), that.getCustodian()) && Objects.equals(getNotes(), that.getNotes()); } Certification();  Certification(Certification templateCertification); }
Certification extends Referenceable { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof Certification)) { return false; } if (!super.equals(objectToCompare)) { return false; } Certification that = (Certification) objectToCompare; return Objects.equals(getCertificateGUID(), that.getCertificateGUID()) && Objects.equals(getCertificationTypeName(), that.getCertificationTypeName()) && Objects.equals(getExaminer(), that.getExaminer()) && Objects.equals(getSummary(), that.getSummary()) && Objects.equals(getLink(), that.getLink()) && Objects.equals(getStartDate(), that.getStartDate()) && Objects.equals(getEndDate(), that.getEndDate()) && Objects.equals(getCertificationConditions(), that.getCertificationConditions()) && Objects.equals(getCreatedBy(), that.getCreatedBy()) && Objects.equals(getCustodian(), that.getCustodian()) && Objects.equals(getNotes(), that.getNotes()); } Certification();  Certification(Certification templateCertification); String getCertificateGUID(); void setCertificateGUID(String certificateGUID); String getCertificationTypeName(); void setCertificationTypeName(String certificationTypeName); String getExaminer(); void setExaminer(String examiner); String getSummary(); void setSummary(String summary); void setLink(ExternalReference link); ExternalReference getLink(); void setStartDate(Date startDate); Date getStartDate(); Date getEndDate(); void setEndDate(Date endDate); String getCertificationConditions(); void setCertificationConditions(String certificationConditions); String getCreatedBy(); void setCreatedBy(String createdBy); String getCustodian(); void setCustodian(String custodian); String getNotes(); void setNotes(String notes); @Override String toString(); @Override boolean equals(Object objectToCompare); }
Certification extends Referenceable { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof Certification)) { return false; } if (!super.equals(objectToCompare)) { return false; } Certification that = (Certification) objectToCompare; return Objects.equals(getCertificateGUID(), that.getCertificateGUID()) && Objects.equals(getCertificationTypeName(), that.getCertificationTypeName()) && Objects.equals(getExaminer(), that.getExaminer()) && Objects.equals(getSummary(), that.getSummary()) && Objects.equals(getLink(), that.getLink()) && Objects.equals(getStartDate(), that.getStartDate()) && Objects.equals(getEndDate(), that.getEndDate()) && Objects.equals(getCertificationConditions(), that.getCertificationConditions()) && Objects.equals(getCreatedBy(), that.getCreatedBy()) && Objects.equals(getCustodian(), that.getCustodian()) && Objects.equals(getNotes(), that.getNotes()); } Certification();  Certification(Certification templateCertification); String getCertificateGUID(); void setCertificateGUID(String certificateGUID); String getCertificationTypeName(); void setCertificationTypeName(String certificationTypeName); String getExaminer(); void setExaminer(String examiner); String getSummary(); void setSummary(String summary); void setLink(ExternalReference link); ExternalReference getLink(); void setStartDate(Date startDate); Date getStartDate(); Date getEndDate(); void setEndDate(Date endDate); String getCertificationConditions(); void setCertificationConditions(String certificationConditions); String getCreatedBy(); void setCreatedBy(String createdBy); String getCustodian(); void setCustodian(String custodian); String getNotes(); void setNotes(String notes); @Override String toString(); @Override boolean equals(Object objectToCompare);  }