当前位置: 首页>>代码示例>>Java>>正文


Java ValidationTestUtils类代码示例

本文整理汇总了Java中org.kuali.rice.krad.datadictionary.validation.ValidationTestUtils的典型用法代码示例。如果您正苦于以下问题:Java ValidationTestUtils类的具体用法?Java ValidationTestUtils怎么用?Java ValidationTestUtils使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ValidationTestUtils类属于org.kuali.rice.krad.datadictionary.validation包,在下文中一共展示了ValidationTestUtils类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testMatch_allowDefault

import org.kuali.rice.krad.datadictionary.validation.ValidationTestUtils; //导入依赖的package包/类
/**
 * tests that only numbers and letters of the alphabet are allowed
 */
@Test public final void testMatch_allowDefault() {
    boolean[] expected = { true, // ""
            false, // "!!!"
            false, // "[a-9]"
            false, // "^A-Z"
            true, // "abc"
            false, // "a bc"
            false, // "a_bc"
            true, // "123"
            false, // "12 3"
            false, // "12_3"
            true, // "a1b2c3"
            false, // "a1b2_c3"
            false, // "a 1b2c3"
            false, // "a 1b2_c3"
            false, //"foo.bar"
            false, //"foo.bar_baz"
            false, //".bar_foo baz"
    };

    ValidationTestUtils.assertPatternMatches(pattern, expected);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:26,代码来源:AlphaNumericValidationPatternTest.java

示例2: testMatch_allowUnderscore

import org.kuali.rice.krad.datadictionary.validation.ValidationTestUtils; //导入依赖的package包/类
/**
 * tests that underscores, numbers and letters of the alphabet are allowed
 */
@Test public final void testMatch_allowUnderscore() {
    boolean[] expected = { true, // ""
            false, // "!!!"
            false, // "[a-9]"
            false, // "^A-Z"
            true, // "abc"
            false, // "a bc"
            true, // "a_bc"
            true, // "123"
            false, // "12 3"
            true, // "12_3"
            true, // "a1b2c3"
            true, // "a1b2_c3"
            false, // "a 1b2c3"
            false, // "a 1b2_c3"
            false, //"foo.bar"
            false, //"foo.bar_baz"
            false, //".bar_foo baz"
    };

    pattern.setAllowUnderscore(true);
    ValidationTestUtils.assertPatternMatches(pattern, expected);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:27,代码来源:AlphaNumericValidationPatternTest.java

示例3: testMatch_allowWhitespace

import org.kuali.rice.krad.datadictionary.validation.ValidationTestUtils; //导入依赖的package包/类
/**
 * tests that white space, numbers and letters of the alphabet are allowed
 */
@Test public final void testMatch_allowWhitespace() {
    boolean[] expected = { true, // ""
            false, // "!!!"
            false, // "[a-9]"
            false, // "^A-Z"
            true, // "abc"
            true, // "a bc"
            false, // "a_bc"
            true, // "123"
            true, // "12 3"
            false, // "12_3"
            true, // "a1b2c3"
            false, // "a1b2_c3"
            true, // "a 1b2c3"
            false, // "a 1b2_c3"
            false, //"foo.bar"
            false, //"foo.bar_baz"
            false, //".bar_foo baz"
    };

    pattern.setAllowWhitespace(true);
    ValidationTestUtils.assertPatternMatches(pattern, expected);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:27,代码来源:AlphaNumericValidationPatternTest.java

示例4: testMatch_allowUnderScoreAndWhiteSpace

import org.kuali.rice.krad.datadictionary.validation.ValidationTestUtils; //导入依赖的package包/类
/**
 * tests that white space, underscores, numbers and letters of the alphabet are allowed
 */
@Test public final void testMatch_allowUnderScoreAndWhiteSpace() {
    boolean[] expected = { true, // ""
            false, // "!!!"
            false, // "[a-9]"
            false, // "^A-Z"
            true, // "abc"
            true, // "a bc"
            true, // "a_bc"
            true, // "123"
            true, // "12 3"
            true, // "12_3"
            true, // "a1b2c3"
            true, // "a1b2_c3"
            true, // "a 1b2c3"
            true, // "a 1b2_c3"
            false, //"foo.bar"
            false, //"foo.bar_baz"
            false, //".bar_foo baz"
    };

    pattern.setAllowUnderscore(true);
    pattern.setAllowWhitespace(true);

    ValidationTestUtils.assertPatternMatches(pattern, expected);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:29,代码来源:AlphaNumericValidationPatternTest.java

示例5: testMatch_allowPeriod

import org.kuali.rice.krad.datadictionary.validation.ValidationTestUtils; //导入依赖的package包/类
/**
 * tests that periods, numbers and letters of the alphabet are allowed
 */
@Test public final void testMatch_allowPeriod() {
    boolean[] expected = { true, // ""
            false, // "!!!"
            false, // "[a-9]"
            false, // "^A-Z"
            true, // "abc"
            false, // "a bc"
            false, // "a_bc"
            true, // "123"
            false, // "12 3"
            false, // "12_3"
            true, // "a1b2c3"
            false, // "a1b2_c3"
            false, // "a 1b2c3"
            false, // "a 1b2_c3"
            true, //"foo.bar"
            false, //"foo.bar_baz"
            false, //".bar_foo baz"
    };

    pattern.setAllowPeriod(true);

    ValidationTestUtils.assertPatternMatches(pattern, expected);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:28,代码来源:AlphaNumericValidationPatternTest.java

示例6: testMatch_allowPeriodAndUnderscore

import org.kuali.rice.krad.datadictionary.validation.ValidationTestUtils; //导入依赖的package包/类
/**
 * tests that periods, underscores, numbers and letters of the alphabet are allowed
 */
@Test public final void testMatch_allowPeriodAndUnderscore() {
    boolean[] expected = { true, // ""
            false, // "!!!"
            false, // "[a-9]"
            false, // "^A-Z"
            true, // "abc"
            false, // "a bc"
            true, // "a_bc"
            true, // "123"
            false, // "12 3"
            true, // "12_3"
            true, // "a1b2c3"
            true, // "a1b2_c3"
            false, // "a 1b2c3"
            false, // "a 1b2_c3"
            true, //"foo.bar"
            true, //"foo.bar_baz"
            false, //".bar_foo baz"
    };

    pattern.setAllowPeriod(true);
    pattern.setAllowUnderscore(true);

    ValidationTestUtils.assertPatternMatches(pattern, expected);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:29,代码来源:AlphaNumericValidationPatternTest.java

示例7: testMatch_allowDefault

import org.kuali.rice.krad.datadictionary.validation.ValidationTestUtils; //导入依赖的package包/类
/**
 * tests that any sequence not containing white space matches
 */
@Test public final void testMatch_allowDefault() {
    boolean[] expected = { true, // ""
            true, // "!!!"
            true, // "[a-9]"
            true, // "^A-Z"
            true, // "abc"
            false, // "a bc"
            true, // "a_bc"
            true, // "123"
            false, // "12 3"
            true, // "12_3"
            true, // "a1b2c3"
            true, // "a1b2_c3"
            false, // "a 1b2c3"
            false, // "a 1b2_c3"
            true, //"foo.bar"
            true, //"foo.bar_baz"
            false, //".bar_foo baz"
    };

    ValidationTestUtils.assertPatternMatches(pattern, expected);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:26,代码来源:AnyCharacterValidationPatternTest.java

示例8: testMatch_allowWhitespace

import org.kuali.rice.krad.datadictionary.validation.ValidationTestUtils; //导入依赖的package包/类
/**
 * tests that sequences containing white space are allowed
 */
@Test public final void testMatch_allowWhitespace() {
    boolean[] expected = { true, // ""
            true, // "!!!"
            true, // "[a-9]"
            true, // "^A-Z"
            true, // "abc"
            true, // "a bc"
            true, // "a_bc"
            true, // "123"
            true, // "12 3"
            true, // "12_3"
            true, // "a1b2c3"
            true, // "a1b2_c3"
            true, // "a 1b2c3"
            true, // "a 1b2_c3"
            true, //"foo.bar"
            true, //"foo.bar_baz"
            true, //".bar_foo baz"
    };

    pattern.setAllowWhitespace(true);
    ValidationTestUtils.assertPatternMatches(pattern, expected);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:27,代码来源:AnyCharacterValidationPatternTest.java

示例9: testMatch_allowDefault

import org.kuali.rice.krad.datadictionary.validation.ValidationTestUtils; //导入依赖的package包/类
/**
 * tests that sequences containing only numbers match
 */
@Test public final void testMatch_allowDefault() {
    boolean[] expected = { true, // ""
            false, // "!!!"
            false, // "[a-9]"
            false, // "^A-Z"
            false, // "abc"
            false, // "a bc"
            false, // "a_bc"
            true, // "123"
            false, // "12 3"
            false, // "12_3"
            false, // "a1b2c3"
            false, // "a1b2_c3"
            false, // "a 1b2c3"
            false, // "a 1b2_c3"
            false, //"foo.bar"
            false, //"foo.bar_baz"
            false, //".bar_foo baz"
    };

    ValidationTestUtils.assertPatternMatches(pattern, expected);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:26,代码来源:NumericValidationPatternTest.java

示例10: testMatch_allowDefault

import org.kuali.rice.krad.datadictionary.validation.ValidationTestUtils; //导入依赖的package包/类
@Test public final void testMatch_allowDefault() {
    boolean[] expected = { true, // ""
            false, // "!!!"
            false, // "[a-9]"
            false, // "^A-Z"
            true, // "abc"
            false, // "a bc"
            false, // "a_bc"
            false, // "123"
            false, // "12 3"
            false, // "12_3"
            false, // "a1b2c3"
            false, // "a1b2_c3"
            false, // "a 1b2c3"
            false, // "a 1b2_c3"
            false, //"foo.bar"
            false, //"foo.bar_baz"
            false, //".bar_foo baz"
    };

    ValidationTestUtils.assertPatternMatches(pattern, expected);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:23,代码来源:AlphaValidationPatternTest.java

示例11: testMatch_allowWhitespace

import org.kuali.rice.krad.datadictionary.validation.ValidationTestUtils; //导入依赖的package包/类
@Test public final void testMatch_allowWhitespace() {
    boolean[] expected = { true, // ""
            false, // "!!!"
            false, // "[a-9]"
            false, // "^A-Z"
            true, // "abc"
            true, // "a bc"
            false, // "a_bc"
            false, // "123"
            false, // "12 3"
            false, // "12_3"
            false, // "a1b2c3"
            false, // "a1b2_c3"
            false, // "a 1b2c3"
            false, // "a 1b2_c3"
            false, //"foo.bar"
            false, //"foo.bar_baz"
            false, //".bar_foo baz"
    };

    pattern.setAllowWhitespace(true);
    ValidationTestUtils.assertPatternMatches(pattern, expected);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:24,代码来源:AlphaValidationPatternTest.java

示例12: testMatch_allowPeriodAndUnderscoreAndSpace

import org.kuali.rice.krad.datadictionary.validation.ValidationTestUtils; //导入依赖的package包/类
/**
 * tests that periods, underscores, white space, numbers and letters of the alphabet are allowed
 */
@Test public final void testMatch_allowPeriodAndUnderscoreAndSpace() {
    boolean[] expected = { true, // ""
            false, // "!!!"
            false, // "[a-9]"
            false, // "^A-Z"
            true, // "abc"
            true, // "a bc"
            true, // "a_bc"
            true, // "123"
            true, // "12 3"
            true, // "12_3"
            true, // "a1b2c3"
            true, // "a1b2_c3"
            true, // "a 1b2c3"
            true, // "a 1b2_c3"
            true, //"foo.bar"
            true, //"foo.bar_baz"
            true, //".bar_foo baz"
    };

    pattern.setAllowPeriod(true);
    pattern.setAllowUnderscore(true);
    pattern.setAllowWhitespace(true);

    ValidationTestUtils.assertPatternMatches(pattern, expected);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:30,代码来源:AlphaNumericValidationPatternTest.java


注:本文中的org.kuali.rice.krad.datadictionary.validation.ValidationTestUtils类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。