當前位置: 首頁>>代碼示例>>Java>>正文


Java TestXMLSearchableAttributeLong類代碼示例

本文整理匯總了Java中org.kuali.rice.kew.docsearch.TestXMLSearchableAttributeLong的典型用法代碼示例。如果您正苦於以下問題:Java TestXMLSearchableAttributeLong類的具體用法?Java TestXMLSearchableAttributeLong怎麽用?Java TestXMLSearchableAttributeLong使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TestXMLSearchableAttributeLong類屬於org.kuali.rice.kew.docsearch包,在下文中一共展示了TestXMLSearchableAttributeLong類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setUpSearchableDoc

import org.kuali.rice.kew.docsearch.TestXMLSearchableAttributeLong; //導入依賴的package包/類
/**
 * Sets up a doc for searching with ranged queries
 */
protected WorkflowDocument setUpSearchableDoc() {
    String documentTypeName = "SearchDocTypeRangeSearchDataType";
	DocumentType docType = ((DocumentTypeService)KEWServiceLocator.getService(KEWServiceLocator.DOCUMENT_TYPE_SERVICE)).findByName(documentTypeName);
    String userNetworkId = "rkirkend";
    WorkflowDocument workflowDocument = WorkflowDocumentFactory.createDocument(getPrincipalIdForName(userNetworkId), documentTypeName);

    /*
     *   Below we are using the keys and values from the custom searchable attribute classes' static constants but
     *   this is only for convenience as those should always be valid values to test for.
     */
    // adding string searchable attribute
    WorkflowAttributeDefinition.Builder stringXMLDef = WorkflowAttributeDefinition.Builder.create("XMLSearchableAttributeStringRange");
    stringXMLDef.addPropertyDefinition(TestXMLSearchableAttributeString.SEARCH_STORAGE_KEY, TestXMLSearchableAttributeString.SEARCH_STORAGE_VALUE);
    workflowDocument.addSearchableDefinition(stringXMLDef.build());
    // adding long searchable attribute
    WorkflowAttributeDefinition.Builder longXMLDef = WorkflowAttributeDefinition.Builder.create("XMLSearchableAttributeStdLongRangeInclusive");
    longXMLDef.addPropertyDefinition(TestXMLSearchableAttributeLong.SEARCH_STORAGE_KEY, TestXMLSearchableAttributeLong.SEARCH_STORAGE_VALUE.toString());
    workflowDocument.addSearchableDefinition(longXMLDef.build());
    // adding float searchable attribute
    WorkflowAttributeDefinition.Builder floatXMLDef = WorkflowAttributeDefinition.Builder.create("XMLSearchableAttributeStdFloatRangeInclusive");
    floatXMLDef.addPropertyDefinition(TestXMLSearchableAttributeFloat.SEARCH_STORAGE_KEY, TestXMLSearchableAttributeFloat.SEARCH_STORAGE_VALUE.toString());
    workflowDocument.addSearchableDefinition(floatXMLDef.build());
    // adding string searchable attribute
    WorkflowAttributeDefinition.Builder dateXMLDef = WorkflowAttributeDefinition.Builder.create("XMLSearchableAttributeStdDateTimeRangeInclusive");
    dateXMLDef.addPropertyDefinition(TestXMLSearchableAttributeDateTime.SEARCH_STORAGE_KEY, DocumentSearchInternalUtils
            .getDisplayValueWithDateOnly(TestXMLSearchableAttributeDateTime.SEARCH_STORAGE_VALUE));
    workflowDocument.addSearchableDefinition(dateXMLDef.build());

    workflowDocument.setTitle("Routing style");
    workflowDocument.route("routing this document.");

    return WorkflowDocumentFactory.loadDocument(getPrincipalIdForName(userNetworkId), workflowDocument.getDocumentId());
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:37,代碼來源:StandardGenericXMLSearchableAttributeRangesTest.java

示例2: testXMLStandardSearchableAttributeWithInvalidValue

import org.kuali.rice.kew.docsearch.TestXMLSearchableAttributeLong; //導入依賴的package包/類
@Test public void testXMLStandardSearchableAttributeWithInvalidValue() throws Exception {
    String documentTypeName = "SearchDocTypeStandardSearchDataType";
    String userNetworkId = "rkirkend";
    WorkflowDocument workflowDocument = WorkflowDocumentFactory.createDocument(getPrincipalIdForName(userNetworkId), documentTypeName);

    /*
     *   Below we are using the keys and values from the custom searchable attribute classes' static constants but
     *   this is only for convenience as those should always be valid values to test for.
     */
    // adding string value in what should be a long searchable attribute
    WorkflowAttributeDefinition.Builder longXMLDef = WorkflowAttributeDefinition.Builder.create("XMLSearchableAttributeStdLong");
    longXMLDef.addPropertyDefinition(TestXMLSearchableAttributeLong.SEARCH_STORAGE_KEY, "123x23");
    workflowDocument.addSearchableDefinition(longXMLDef.build());

    workflowDocument.setTitle("Routing style");
    try {
        workflowDocument.route("routing this document.");
        fail("Document should be unroutable with invalid searchable attribute value");
    } catch (Exception e) {
        e.printStackTrace();
    }
    /*
     * The call to TestUtilities below is needed because when exception routing spawns a new thread (see
     * TestExceptionRoutingServiceImpl class) the next test will begin before the exception thread is complete and
     * cause errors. This was originally discovered because the test method
     * testXMLStandardSearchableAttributesWithDataType() would run and get errors loading xml data for workgroups
     * perhaps because the exception thread was keeping the cache around and now allowing it to be cleared?
     */
    TestUtilities.waitForExceptionRouting();
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:31,代碼來源:StandardGenericXMLSearchableAttributeTest.java

示例3: testValidateUserSearchRangeInputs

import org.kuali.rice.kew.docsearch.TestXMLSearchableAttributeLong; //導入依賴的package包/類
@Test  public void testValidateUserSearchRangeInputs() {
    // <searchDefinition rangeSearch="true"/>
    StandardGenericXMLSearchableAttribute searchAttribute = getAttribute("XMLSearchableAttributeStringRange");
    ExtensionDefinition ed = createExtensionDefinition("XMLSearchableAttributeStringRange");

    RemotableAttributeError error = assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeString.SEARCH_STORAGE_KEY, ">= jack", null);
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeString.SEARCH_STORAGE_KEY, "<= jack.jack", "differ on upper bound inclusivity");
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeString.SEARCH_STORAGE_KEY, "< jack.jack", "Invalid first name");
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeString.SEARCH_STORAGE_KEY, ">= jack*jack", null);
     // TODO: * gets stripped from value

    // <searchDefinition dataType="long" rangeSearch="true"/>
    searchAttribute = getAttribute("XMLSearchableAttributeStdLongRange");
    ed = createExtensionDefinition("XMLSearchableAttributeStdLongRange");

    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeLong.SEARCH_STORAGE_KEY, "<= " + TestXMLSearchableAttributeLong.SEARCH_STORAGE_VALUE.toString(), "differ on upper bound inclusivity");
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeLong.SEARCH_STORAGE_KEY, "< " + TestXMLSearchableAttributeLong.SEARCH_STORAGE_VALUE.toString(), null);
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeLong.SEARCH_STORAGE_KEY, ">= " + TestXMLSearchableAttributeLong.SEARCH_STORAGE_VALUE.toString() + ".33","does not conform to standard validation for field type.");
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeLong.SEARCH_STORAGE_KEY, "<= jack*jack", "differ on upper bound inclusivity");
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeLong.SEARCH_STORAGE_KEY, "< jack*jack", "does not conform to standard validation for field type.");

    // <searchDefinition dataType="float">
    //   <rangeDefinition inclusive="false">
    //     <lower label="starting"/>
    //     <upper label="ending"/>
    //   </rangeDefinition>
    // </searchDefinition>
    searchAttribute = getAttribute("XMLSearchableAttributeStdFloatRange");
    ed = createExtensionDefinition("XMLSearchableAttributeStdFloatRange");
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeFloat.SEARCH_STORAGE_KEY, ">= " + TestXMLSearchableAttributeFloat.SEARCH_STORAGE_VALUE.toString(), "differ on lower bound inclusivity");
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeFloat.SEARCH_STORAGE_KEY, "> " + TestXMLSearchableAttributeFloat.SEARCH_STORAGE_VALUE.toString(), null);
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeFloat.SEARCH_STORAGE_KEY, "<= " + TestXMLSearchableAttributeFloat.SEARCH_STORAGE_VALUE.toString() + "a", "differ on upper bound inclusivity");
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeFloat.SEARCH_STORAGE_KEY, "< " + TestXMLSearchableAttributeFloat.SEARCH_STORAGE_VALUE.toString() + "a", "does not conform to standard validation for field type.");
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeFloat.SEARCH_STORAGE_KEY, ">= " + TestXMLSearchableAttributeFloat.SEARCH_STORAGE_VALUE.toString() + "*", "differ on lower bound inclusivity");
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeFloat.SEARCH_STORAGE_KEY, "> " + TestXMLSearchableAttributeFloat.SEARCH_STORAGE_VALUE.toString() + "*", "does not conform to standard validation for field type.");

    // <searchDefinition dataType="datetime" datePicker="false">
    //   <rangeDefinition inclusive="false">
    //     <lower/>
    //     <upper inclusive="true" datePicker="true"/>
    //   </rangeDefinition>
    // </searchDefinition>
    searchAttribute = getAttribute("XMLSearchableAttributeStdDateTimeRange");
    ed = createExtensionDefinition("XMLSearchableAttributeStdDateTimeRange");
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeDateTime.SEARCH_STORAGE_KEY, "<= " + DocumentSearchInternalUtils.getDisplayValueWithDateOnly(TestXMLSearchableAttributeDateTime.SEARCH_STORAGE_VALUE), null);
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeDateTime.SEARCH_STORAGE_KEY, ">= 001/5/08", "differ on lower bound inclusivity");
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeDateTime.SEARCH_STORAGE_KEY, "> 001/5/08", null);
    error = assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeDateTime.SEARCH_STORAGE_KEY, ">= 41/5/08", "differ on lower bound inclusivity");
    error = assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeDateTime.SEARCH_STORAGE_KEY, "> 41/5/08", "does not conform to standard validation for field type.");
    error = assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeDateTime.SEARCH_STORAGE_KEY, "<= 01/02/20*", "does not conform to standard validation for field type.");
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:52,代碼來源:StandardGenericXMLSearchableAttributeRangesTest.java

示例4: testLongRanges

import org.kuali.rice.kew.docsearch.TestXMLSearchableAttributeLong; //導入依賴的package包/類
@Test public void testLongRanges() throws Exception {
    WorkflowDocument doc = setUpSearchableDoc();
    String userId = doc.getInitiatorPrincipalId();
    String docType = doc.getDocumentTypeName();

    String searchAttributeLongKey = TestXMLSearchableAttributeLong.SEARCH_STORAGE_KEY;
    Long searchAttributeLongValue = TestXMLSearchableAttributeLong.SEARCH_STORAGE_VALUE.longValue();
    Long longValueToUse = null;

    // test lower bound only
    longValueToUse = searchAttributeLongValue; // lowerbound == value
    assertRangeSearchResults(docType, userId, searchAttributeLongKey, longValueToUse.toString(), null, false, 1);

    longValueToUse = Long.valueOf(searchAttributeLongValue.longValue() - 1); // lowerbound below value
    assertRangeSearchResults(docType, userId, searchAttributeLongKey, longValueToUse.toString(), null, false, 1);

    longValueToUse = Long.valueOf(searchAttributeLongValue.longValue() + 1); // lowerbound is above value
    assertRangeSearchResults(docType, userId, searchAttributeLongKey, longValueToUse.toString(), null, false, 0);

    // test upper bound only
    longValueToUse = searchAttributeLongValue; // upper bound == value
    assertRangeSearchResults(docType, userId, searchAttributeLongKey, null, longValueToUse.toString(), true, 1);

    longValueToUse = Long.valueOf(searchAttributeLongValue.longValue() - 1); // upper bound < value
    assertRangeSearchResults(docType, userId, searchAttributeLongKey, null, longValueToUse.toString(), true, 0);

    longValueToUse = Long.valueOf(searchAttributeLongValue.longValue() + 1); // upper bound > value
    assertRangeSearchResults(docType, userId, searchAttributeLongKey, null, longValueToUse.toString(), true, 1);

    // test both bounds
    // lowerbound == upperbound == value
    assertRangeSearchResults(docType, userId, searchAttributeLongKey,
                             Long.valueOf(searchAttributeLongValue.longValue()).toString(),
                             Long.valueOf(searchAttributeLongValue.longValue()).toString(), true, 1);

    // lower and upper bound > value
    assertRangeSearchResults(docType, userId, searchAttributeLongKey,
                             Long.valueOf(searchAttributeLongValue.longValue() + 2).toString(),
                             Long.valueOf(searchAttributeLongValue.longValue() + 4).toString(), true, 0);

    // lower and upper bound < value, but lower > upper
    assertRangeSearchResults(docType, userId, searchAttributeLongKey,
                             Long.valueOf(searchAttributeLongValue.longValue() - 2).toString(),
                             Long.valueOf(searchAttributeLongValue.longValue() - 4).toString(), true, EXPECT_EXCEPTION);
    // lower and upper bound < value, lower < upper
    assertRangeSearchResults(docType, userId, searchAttributeLongKey,
                             Long.valueOf(searchAttributeLongValue.longValue() - 4).toString(),
                             Long.valueOf(searchAttributeLongValue.longValue() - 2).toString(), true, 0);

    // lower bound < value, upper bound > value
    assertRangeSearchResults(docType, userId, searchAttributeLongKey,
                             Long.valueOf(searchAttributeLongValue.longValue() - 2).toString(),
                             Long.valueOf(searchAttributeLongValue.longValue() + 2).toString(), true, 1);

    // upper < lower
    assertRangeSearchResults(docType, userId, searchAttributeLongKey,
                             Long.valueOf(searchAttributeLongValue.longValue() + 2).toString(),
                             Long.valueOf(searchAttributeLongValue.longValue() - 2).toString(), true, EXPECT_EXCEPTION);
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:60,代碼來源:StandardGenericXMLSearchableAttributeRangesTest.java

示例5: testDocumentSearchAttributeWildcardingDisallow

import org.kuali.rice.kew.docsearch.TestXMLSearchableAttributeLong; //導入依賴的package包/類
@Test public void testDocumentSearchAttributeWildcardingDisallow() throws Exception {
    DocumentSearchService docSearchService = (DocumentSearchService) KEWServiceLocator.getService(KEWServiceLocator.DOCUMENT_SEARCH_SERVICE);

    String documentTypeName = "SearchDocTypeStandardSearchDataType";
    DocumentType docType = ((DocumentTypeService)KEWServiceLocator.getService(KEWServiceLocator.DOCUMENT_TYPE_SERVICE)).findByName(documentTypeName);
    String userNetworkId = "rkirkend";
    WorkflowDocument workflowDocument = WorkflowDocumentFactory.createDocument(getPrincipalIdForName(userNetworkId), documentTypeName);

    /*
     *   Below we are using the keys and values from the custom searchable attribute classes' static constants but
     *   this is only for convenience as those should always be valid values to test for.
     */
    WorkflowAttributeDefinition.Builder longXMLDef = WorkflowAttributeDefinition.Builder.create("XMLSearchableAttributeStdLong");
    longXMLDef.addPropertyDefinition(TestXMLSearchableAttributeLong.SEARCH_STORAGE_KEY, TestXMLSearchableAttributeLong.SEARCH_STORAGE_VALUE.toString());
    workflowDocument.addSearchableDefinition(longXMLDef.build());
    workflowDocument.setTitle("Routing style");
    workflowDocument.route("routing this document.");

    Person user = KimApiServiceLocator.getPersonService().getPersonByPrincipalName(userNetworkId);

    String validSearchValue = TestXMLSearchableAttributeLong.SEARCH_STORAGE_VALUE.toString();
    DocumentSearchCriteria.Builder criteria = null;
    DocumentSearchResults results = null;
    criteria = DocumentSearchCriteria.Builder.create();
    criteria.setDocumentTypeName(documentTypeName);
    addSearchableAttribute(criteria, TestXMLSearchableAttributeLong.SEARCH_STORAGE_KEY, validSearchValue);
    results = docSearchService.lookupDocuments(user.getPrincipalId(), criteria.build());
    assertEquals("Search results should have one document.", 1, results.getSearchResults().size());

    criteria = DocumentSearchCriteria.Builder.create();
    criteria.setDocumentTypeName(documentTypeName);
    addSearchableAttribute(criteria, TestXMLSearchableAttributeLong.SEARCH_STORAGE_KEY,
            "*" + validSearchValue.substring(2));

    if ((new SearchableAttributeLongValue()).allowsWildcards()) {
        results = docSearchService.lookupDocuments(user.getPrincipalId(), criteria.build());
        assertEquals("Search results should be empty using wildcard '*' value.", 0, results.getSearchResults().size());
    } else {
        try {
            docSearchService.lookupDocuments(user.getPrincipalId(), criteria.build());
            fail("Search results should be throwing a validation exception for use of the character '*' without allowing wildcards");
        } catch (WorkflowServiceErrorException wsee) {}
    }

    criteria = DocumentSearchCriteria.Builder.create();
    criteria.setDocumentTypeName(documentTypeName);
    addSearchableAttribute(criteria, TestXMLSearchableAttributeLong.SEARCH_STORAGE_KEY, validSearchValue.substring(
            0, (validSearchValue.length() - 2)));
    results = docSearchService.lookupDocuments(user.getPrincipalId(), criteria.build());
    assertEquals("Search results should be empty trying to use assumed ending wildcard.", 0, results.getSearchResults().size());
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:52,代碼來源:StandardGenericXMLSearchableAttributeTest.java

示例6: testValidateUserSearchInputs

import org.kuali.rice.kew.docsearch.TestXMLSearchableAttributeLong; //導入依賴的package包/類
@Test  public void testValidateUserSearchInputs() {
    String documentTypeName = "SearchDocType";

    StandardGenericXMLSearchableAttribute searchAttribute = getAttribute("XMLSearchableAttribute");
    ExtensionDefinition ed = createExtensionDefinition("XMLSearchableAttribute");
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeString.SEARCH_STORAGE_KEY, "jack", false);
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeString.SEARCH_STORAGE_KEY, "jack.jack", true);
    // NOTE: the original intent of this particular test is unclear. it currently passes since the wildcard character is stripped
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeString.SEARCH_STORAGE_KEY,  "jack*jack", false);

    searchAttribute = getAttribute("XMLSearchableAttributeStdLong");
    ed = createExtensionDefinition("XMLSearchableAttributeStdLong");
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeLong.SEARCH_STORAGE_KEY, TestXMLSearchableAttributeLong.SEARCH_STORAGE_VALUE.toString(), false);
    RemotableAttributeError error = assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeLong.SEARCH_STORAGE_KEY, TestXMLSearchableAttributeLong.SEARCH_STORAGE_VALUE.toString() + ".33", true);
    assertTrue("Validation error is incorrect", error.getMessage().endsWith("does not conform to standard validation for field type."));
    error = assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeLong.SEARCH_STORAGE_KEY, TestXMLSearchableAttributeLong.SEARCH_STORAGE_VALUE.toString() + "jack*jack", true);
    assertTrue("Validation error is incorrect", error.getMessage().endsWith("does not conform to standard validation for field type."));

    searchAttribute = getAttribute("XMLSearchableAttributeStdFloat");
    ed = createExtensionDefinition("XMLSearchableAttributeStdFloat");
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeFloat.SEARCH_STORAGE_KEY, TestXMLSearchableAttributeFloat.SEARCH_STORAGE_VALUE.toString(), false);
    error = assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeFloat.SEARCH_STORAGE_KEY, TestXMLSearchableAttributeFloat.SEARCH_STORAGE_VALUE.toString() + "a", true);
    assertTrue("Validation error is incorrect", error.getMessage().endsWith("does not conform to standard validation for field type."));
    error = assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeFloat.SEARCH_STORAGE_KEY, TestXMLSearchableAttributeFloat.SEARCH_STORAGE_VALUE.toString() + "*", true);
    assertTrue("Validation error is incorrect", error.getMessage().endsWith("does not conform to standard validation for field type."));

    searchAttribute = getAttribute("XMLSearchableAttributeStdCurrency");
    ed = createExtensionDefinition("XMLSearchableAttributeStdCurrency");
    String key = "testCurrencyKey";
    Float value = Float.valueOf("5486.25");
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, key, value.toString(), false);
    error = assertDocumentSearchCriteriaValidation(searchAttribute, ed, key, value.toString() + "a", true);
    assertTrue("Validation error is incorrect", error.getMessage().endsWith("does not conform to standard validation for field type."));
    error = assertDocumentSearchCriteriaValidation(searchAttribute, ed, key, value.toString() + "*", true);
    assertTrue("Validation error is incorrect", error.getMessage().endsWith("does not conform to standard validation for field type."));

    searchAttribute = getAttribute("XMLSearchableAttributeStdDateTime");
    ed = createExtensionDefinition("XMLSearchableAttributeStdDateTime");
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeDateTime.SEARCH_STORAGE_KEY, DocumentSearchInternalUtils.getDisplayValueWithDateOnly(TestXMLSearchableAttributeDateTime.SEARCH_STORAGE_VALUE), false);
    assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeDateTime.SEARCH_STORAGE_KEY, "001/5/08", false);
    error = assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeDateTime.SEARCH_STORAGE_KEY, "41/5/08", true);
    assertTrue("Validation error is incorrect", error.getMessage().endsWith("does not conform to standard validation for field type."));
    error = assertDocumentSearchCriteriaValidation(searchAttribute, ed, TestXMLSearchableAttributeDateTime.SEARCH_STORAGE_KEY, "01/02/20*", true);
    assertTrue("Validation error is incorrect", error.getMessage().endsWith("does not conform to standard validation for field type."));
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:46,代碼來源:StandardGenericXMLSearchableAttributeTest.java


注:本文中的org.kuali.rice.kew.docsearch.TestXMLSearchableAttributeLong類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。