@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); ComplexSchemaType sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); ComplexSchemaType differentObject = getTestObject(); differentObject.setGUID("Different"); assertFalse(getTestObject().equals(differentObject)); }
@Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof ComplexSchemaType)) { return false; } if (!super.equals(objectToCompare)) { return false; } ComplexSchemaType that = (ComplexSchemaType) objectToCompare; return Objects.equals(getAttributeCount(), that.getAttributeCount()); }
ComplexSchemaType extends SchemaType { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof ComplexSchemaType)) { return false; } if (!super.equals(objectToCompare)) { return false; } ComplexSchemaType that = (ComplexSchemaType) objectToCompare; return Objects.equals(getAttributeCount(), that.getAttributeCount()); } }
ComplexSchemaType extends SchemaType { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof ComplexSchemaType)) { return false; } if (!super.equals(objectToCompare)) { return false; } ComplexSchemaType that = (ComplexSchemaType) objectToCompare; return Objects.equals(getAttributeCount(), that.getAttributeCount()); } ComplexSchemaType();  ComplexSchemaType(ComplexSchemaType template); }
ComplexSchemaType extends SchemaType { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof ComplexSchemaType)) { return false; } if (!super.equals(objectToCompare)) { return false; } ComplexSchemaType that = (ComplexSchemaType) objectToCompare; return Objects.equals(getAttributeCount(), that.getAttributeCount()); } ComplexSchemaType();  ComplexSchemaType(ComplexSchemaType template); int getAttributeCount(); void setAttributeCount(int attributeCount); @Override SchemaElement cloneSchemaElement(); @Override SchemaType cloneSchemaType(); @Override String toString(); @Override boolean equals(Object objectToCompare); }
ComplexSchemaType extends SchemaType { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof ComplexSchemaType)) { return false; } if (!super.equals(objectToCompare)) { return false; } ComplexSchemaType that = (ComplexSchemaType) objectToCompare; return Objects.equals(getAttributeCount(), that.getAttributeCount()); } ComplexSchemaType();  ComplexSchemaType(ComplexSchemaType template); int getAttributeCount(); void setAttributeCount(int attributeCount); @Override SchemaElement cloneSchemaElement(); @Override SchemaType cloneSchemaType(); @Override String toString(); @Override boolean equals(Object objectToCompare);  }