@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); RelatedMediaReference sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); RelatedMediaReference differentObject = getTestObject(); differentObject.setGUID("Different"); assertFalse(getTestObject().equals(differentObject)); differentObject = getTestObject(); differentObject.setMediaType(RelatedMediaType.AUDIO); assertFalse(getTestObject().equals(differentObject)); }
@Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof RelatedMediaReference)) { return false; } if (!super.equals(objectToCompare)) { return false; } RelatedMediaReference that = (RelatedMediaReference) objectToCompare; return getMediaType() == that.getMediaType() && Objects.equals(getMediaUsageList(), that.getMediaUsageList()); }
RelatedMediaReference extends ExternalReference { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof RelatedMediaReference)) { return false; } if (!super.equals(objectToCompare)) { return false; } RelatedMediaReference that = (RelatedMediaReference) objectToCompare; return getMediaType() == that.getMediaType() && Objects.equals(getMediaUsageList(), that.getMediaUsageList()); } }
RelatedMediaReference extends ExternalReference { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof RelatedMediaReference)) { return false; } if (!super.equals(objectToCompare)) { return false; } RelatedMediaReference that = (RelatedMediaReference) objectToCompare; return getMediaType() == that.getMediaType() && Objects.equals(getMediaUsageList(), that.getMediaUsageList()); } RelatedMediaReference();  RelatedMediaReference(RelatedMediaReference templateRelatedMediaReference); }
RelatedMediaReference extends ExternalReference { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof RelatedMediaReference)) { return false; } if (!super.equals(objectToCompare)) { return false; } RelatedMediaReference that = (RelatedMediaReference) objectToCompare; return getMediaType() == that.getMediaType() && Objects.equals(getMediaUsageList(), that.getMediaUsageList()); } RelatedMediaReference();  RelatedMediaReference(RelatedMediaReference templateRelatedMediaReference); RelatedMediaType getMediaType(); void setMediaType(RelatedMediaType mediaType); List<RelatedMediaUsage> getMediaUsageList(); void setMediaUsageList(List<RelatedMediaUsage> mediaUsageList); @Override String toString(); @Override boolean equals(Object objectToCompare); }
RelatedMediaReference extends ExternalReference { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof RelatedMediaReference)) { return false; } if (!super.equals(objectToCompare)) { return false; } RelatedMediaReference that = (RelatedMediaReference) objectToCompare; return getMediaType() == that.getMediaType() && Objects.equals(getMediaUsageList(), that.getMediaUsageList()); } RelatedMediaReference();  RelatedMediaReference(RelatedMediaReference templateRelatedMediaReference); RelatedMediaType getMediaType(); void setMediaType(RelatedMediaType mediaType); List<RelatedMediaUsage> getMediaUsageList(); void setMediaUsageList(List<RelatedMediaUsage> mediaUsageList); @Override String toString(); @Override boolean equals(Object objectToCompare);  }