@Test public void testEqual() { Decision decision1 = null; Decision decision2 = null; RequestPolicy notDecision = null; assertTrue("Same null decision should be equal", DecisionUtils.equal(decision1, decision1)); assertTrue("Null decisions should be equal", DecisionUtils.equal(decision1, decision2)); assertTrue("Null decision and null object should be equal", DecisionUtils.equal(decision1, notDecision)); decision1 = Decision.DENY; decision2 = Decision.INDETERMINATE; notDecision = new RequestPolicy(); assertTrue("Same empty decision should be equal", DecisionUtils.equal(decision1, decision1)); assertTrue("Same decision should be equal", DecisionUtils.equal(decision1, decision1)); assertFalse("Different decisions should be equal", DecisionUtils.equal(decision1, decision2)); assertFalse("Different decisions should be equal (inverse)", DecisionUtils.equal(decision2, decision1)); decision2 = Decision.DENY; assertTrue("Equal decisions should be equal", DecisionUtils.equal(decision1, decision2)); assertTrue("Equal decisions should be equal (inverse)", DecisionUtils.equal(decision2, decision1)); }
public static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision o1, Object o2) { if (o1 == o2) { return true; } if (o2 == null) { return false; } if (o1 == null) { return false; } if (o1.getClass() != o2.getClass()) { return false; } org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision ro2 = (org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision) o2; return (o1.value().equals(ro2.value())); }
DecisionUtils { public static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision o1, Object o2) { if (o1 == o2) { return true; } if (o2 == null) { return false; } if (o1 == null) { return false; } if (o1.getClass() != o2.getClass()) { return false; } org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision ro2 = (org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision) o2; return (o1.value().equals(ro2.value())); } }
DecisionUtils { public static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision o1, Object o2) { if (o1 == o2) { return true; } if (o2 == null) { return false; } if (o1 == null) { return false; } if (o1.getClass() != o2.getClass()) { return false; } org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision ro2 = (org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision) o2; return (o1.value().equals(ro2.value())); }  }
DecisionUtils { public static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision o1, Object o2) { if (o1 == o2) { return true; } if (o2 == null) { return false; } if (o1 == null) { return false; } if (o1.getClass() != o2.getClass()) { return false; } org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision ro2 = (org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision) o2; return (o1.value().equals(ro2.value())); }  static Decision toDecision(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision decisionBean); static List<Decision> toDecisions(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision> decisionBeans); static org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision toDecisionBean(Decision decision); static List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision> toDecisionBeans(List<Decision> decisions); static String toXmlString(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision decision); @Deprecated static boolean equals(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision o1, Object o2); static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision o1, Object o2); }
DecisionUtils { public static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision o1, Object o2) { if (o1 == o2) { return true; } if (o2 == null) { return false; } if (o1 == null) { return false; } if (o1.getClass() != o2.getClass()) { return false; } org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision ro2 = (org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision) o2; return (o1.value().equals(ro2.value())); }  static Decision toDecision(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision decisionBean); static List<Decision> toDecisions(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision> decisionBeans); static org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision toDecisionBean(Decision decision); static List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision> toDecisionBeans(List<Decision> decisions); static String toXmlString(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision decision); @Deprecated static boolean equals(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision o1, Object o2); static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Decision o1, Object o2);  }