@Test public void testValidate() { testActivity = new ActivityDTO(); testActivity.setVerb(ActivityVerb.POST); sut.validate(testActivity); }
public void validate(final ActivityDTO inActivity) { ValidationException ve = new ValidationException(); if (inActivity.getOriginalActor() != null && inActivity.getOriginalActor().getUniqueIdentifier() != null && inActivity.getOriginalActor().getUniqueIdentifier().length() > 0) { ve.addError("OriginalActor", "Must not be included for Post verbs."); } if (!ve.getErrors().isEmpty()) { throw ve; } }
PostVerbValidator implements ActivityValidator { public void validate(final ActivityDTO inActivity) { ValidationException ve = new ValidationException(); if (inActivity.getOriginalActor() != null && inActivity.getOriginalActor().getUniqueIdentifier() != null && inActivity.getOriginalActor().getUniqueIdentifier().length() > 0) { ve.addError("OriginalActor", "Must not be included for Post verbs."); } if (!ve.getErrors().isEmpty()) { throw ve; } } }
PostVerbValidator implements ActivityValidator { public void validate(final ActivityDTO inActivity) { ValidationException ve = new ValidationException(); if (inActivity.getOriginalActor() != null && inActivity.getOriginalActor().getUniqueIdentifier() != null && inActivity.getOriginalActor().getUniqueIdentifier().length() > 0) { ve.addError("OriginalActor", "Must not be included for Post verbs."); } if (!ve.getErrors().isEmpty()) { throw ve; } }  }
PostVerbValidator implements ActivityValidator { public void validate(final ActivityDTO inActivity) { ValidationException ve = new ValidationException(); if (inActivity.getOriginalActor() != null && inActivity.getOriginalActor().getUniqueIdentifier() != null && inActivity.getOriginalActor().getUniqueIdentifier().length() > 0) { ve.addError("OriginalActor", "Must not be included for Post verbs."); } if (!ve.getErrors().isEmpty()) { throw ve; } }  void validate(final ActivityDTO inActivity); }
PostVerbValidator implements ActivityValidator { public void validate(final ActivityDTO inActivity) { ValidationException ve = new ValidationException(); if (inActivity.getOriginalActor() != null && inActivity.getOriginalActor().getUniqueIdentifier() != null && inActivity.getOriginalActor().getUniqueIdentifier().length() > 0) { ve.addError("OriginalActor", "Must not be included for Post verbs."); } if (!ve.getErrors().isEmpty()) { throw ve; } }  void validate(final ActivityDTO inActivity);  }