@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); DerivedSchemaAttribute sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); DerivedSchemaAttribute differentObject = getTestObject(); differentObject.setGUID("Different"); assertFalse(getTestObject().equals(differentObject)); }
@Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof DerivedSchemaAttribute)) { return false; } if (!super.equals(objectToCompare)) { return false; } DerivedSchemaAttribute that = (DerivedSchemaAttribute) objectToCompare; return Objects.equals(getFormula(), that.getFormula()) && Objects.equals(getQueries(), that.getQueries()); }
DerivedSchemaAttribute extends SchemaAttribute { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof DerivedSchemaAttribute)) { return false; } if (!super.equals(objectToCompare)) { return false; } DerivedSchemaAttribute that = (DerivedSchemaAttribute) objectToCompare; return Objects.equals(getFormula(), that.getFormula()) && Objects.equals(getQueries(), that.getQueries()); } }
DerivedSchemaAttribute extends SchemaAttribute { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof DerivedSchemaAttribute)) { return false; } if (!super.equals(objectToCompare)) { return false; } DerivedSchemaAttribute that = (DerivedSchemaAttribute) objectToCompare; return Objects.equals(getFormula(), that.getFormula()) && Objects.equals(getQueries(), that.getQueries()); } DerivedSchemaAttribute();  DerivedSchemaAttribute(DerivedSchemaAttribute template); }
DerivedSchemaAttribute extends SchemaAttribute { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof DerivedSchemaAttribute)) { return false; } if (!super.equals(objectToCompare)) { return false; } DerivedSchemaAttribute that = (DerivedSchemaAttribute) objectToCompare; return Objects.equals(getFormula(), that.getFormula()) && Objects.equals(getQueries(), that.getQueries()); } DerivedSchemaAttribute();  DerivedSchemaAttribute(DerivedSchemaAttribute template); String getFormula(); void setFormula(String formula); List<SchemaImplementationQuery> getQueries(); void setQueries(List<SchemaImplementationQuery> queries); @Override SchemaElement cloneSchemaElement(); @Override String toString(); @Override boolean equals(Object objectToCompare); }
DerivedSchemaAttribute extends SchemaAttribute { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof DerivedSchemaAttribute)) { return false; } if (!super.equals(objectToCompare)) { return false; } DerivedSchemaAttribute that = (DerivedSchemaAttribute) objectToCompare; return Objects.equals(getFormula(), that.getFormula()) && Objects.equals(getQueries(), that.getQueries()); } DerivedSchemaAttribute();  DerivedSchemaAttribute(DerivedSchemaAttribute template); String getFormula(); void setFormula(String formula); List<SchemaImplementationQuery> getQueries(); void setQueries(List<SchemaImplementationQuery> queries); @Override SchemaElement cloneSchemaElement(); @Override String toString(); @Override boolean equals(Object objectToCompare);  }