@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); ExternalReference sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); ExternalReference differentObject = getTestObject(); differentObject.setGUID("Different"); assertFalse(getTestObject().equals(differentObject)); }
@Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof ExternalReference)) { return false; } if (!super.equals(objectToCompare)) { return false; } ExternalReference that = (ExternalReference) objectToCompare; return Objects.equals(getReferenceId(), that.getReferenceId()) && Objects.equals(getLinkDescription(), that.getLinkDescription()) && Objects.equals(getDisplayName(), that.getDisplayName()) && Objects.equals(uri, that.uri) && Objects.equals(getResourceDescription(), that.getResourceDescription()) && Objects.equals(getVersion(), that.getVersion()) && Objects.equals(getOrganization(), that.getOrganization()); }
ExternalReference extends Referenceable { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof ExternalReference)) { return false; } if (!super.equals(objectToCompare)) { return false; } ExternalReference that = (ExternalReference) objectToCompare; return Objects.equals(getReferenceId(), that.getReferenceId()) && Objects.equals(getLinkDescription(), that.getLinkDescription()) && Objects.equals(getDisplayName(), that.getDisplayName()) && Objects.equals(uri, that.uri) && Objects.equals(getResourceDescription(), that.getResourceDescription()) && Objects.equals(getVersion(), that.getVersion()) && Objects.equals(getOrganization(), that.getOrganization()); } }
ExternalReference extends Referenceable { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof ExternalReference)) { return false; } if (!super.equals(objectToCompare)) { return false; } ExternalReference that = (ExternalReference) objectToCompare; return Objects.equals(getReferenceId(), that.getReferenceId()) && Objects.equals(getLinkDescription(), that.getLinkDescription()) && Objects.equals(getDisplayName(), that.getDisplayName()) && Objects.equals(uri, that.uri) && Objects.equals(getResourceDescription(), that.getResourceDescription()) && Objects.equals(getVersion(), that.getVersion()) && Objects.equals(getOrganization(), that.getOrganization()); } ExternalReference();  ExternalReference(ExternalReference templateExternalReference); }
ExternalReference extends Referenceable { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof ExternalReference)) { return false; } if (!super.equals(objectToCompare)) { return false; } ExternalReference that = (ExternalReference) objectToCompare; return Objects.equals(getReferenceId(), that.getReferenceId()) && Objects.equals(getLinkDescription(), that.getLinkDescription()) && Objects.equals(getDisplayName(), that.getDisplayName()) && Objects.equals(uri, that.uri) && Objects.equals(getResourceDescription(), that.getResourceDescription()) && Objects.equals(getVersion(), that.getVersion()) && Objects.equals(getOrganization(), that.getOrganization()); } ExternalReference();  ExternalReference(ExternalReference templateExternalReference); String getReferenceId(); void setReferenceId(String referenceId); String getLinkDescription(); void setLinkDescription(String linkDescription); String getDisplayName(); void setDisplayName(String displayName); String getURI(); void setURI(String uri); String getResourceDescription(); void setResourceDescription(String resourceDescription); String getVersion(); void setVersion(String version); String getOrganization(); void setOrganization(String organization); @Override String toString(); @Override boolean equals(Object objectToCompare); }
ExternalReference extends Referenceable { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof ExternalReference)) { return false; } if (!super.equals(objectToCompare)) { return false; } ExternalReference that = (ExternalReference) objectToCompare; return Objects.equals(getReferenceId(), that.getReferenceId()) && Objects.equals(getLinkDescription(), that.getLinkDescription()) && Objects.equals(getDisplayName(), that.getDisplayName()) && Objects.equals(uri, that.uri) && Objects.equals(getResourceDescription(), that.getResourceDescription()) && Objects.equals(getVersion(), that.getVersion()) && Objects.equals(getOrganization(), that.getOrganization()); } ExternalReference();  ExternalReference(ExternalReference templateExternalReference); String getReferenceId(); void setReferenceId(String referenceId); String getLinkDescription(); void setLinkDescription(String linkDescription); String getDisplayName(); void setDisplayName(String displayName); String getURI(); void setURI(String uri); String getResourceDescription(); void setResourceDescription(String resourceDescription); String getVersion(); void setVersion(String version); String getOrganization(); void setOrganization(String organization); @Override String toString(); @Override boolean equals(Object objectToCompare);  }