コード例 #1
0
  /**
   * Case for if a <code>{@link PersonEditableField}</code> already exists
   *
   * @throws Exception
   */
  public void processCustomRouteDocumentBusinessRules_ExistingField() throws Exception {
    PersonEditableField editableField = ADDRESS_LINE1_FIELD.getInstance();
    MaintenanceDocument editableFieldDocument = newMaintDoc(editableField);
    PersonEditableFieldRule rule =
        setupMaintDocRule(editableFieldDocument, PersonEditableFieldRule.class);

    assertTrue(rule.processCustomRouteDocumentBusinessRules(editableFieldDocument));
  }
コード例 #2
0
  /**
   * Valid case where there are no persisted <code>{@link PersonEditableField}</code> already
   *
   * @throws Exception
   */
  @Test
  public void processCustomRouteDocumentBusinessRules_Normal() throws Exception {
    PersonEditableField editableField = ADDRESS_LINE2_FIELD.getInstance();
    MaintenanceDocument editableFieldDocument = newMaintDoc(editableField);
    PersonEditableFieldRule rule =
        setupMaintDocRule(editableFieldDocument, PersonEditableFieldRule.class);

    info("pass %s", rule.processCustomRouteDocumentBusinessRules(editableFieldDocument));
  }