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


Java DefaultValuesNullTester类代码示例

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


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

示例1: setUp

import com.openpojo.validation.test.impl.DefaultValuesNullTester; //导入依赖的package包/类
@Before
public void setUp() {
	AttributeHelper.registerFieldPrefix("_");

	_validator = ValidatorBuilder.create(
	).with(
		new GetterMustExistRule()
	).with(
		new NoStaticExceptFinalRule()
	).with(
		new NoFieldShadowingRule()
	).with(
		new NoPublicFieldsRule()
	).with(
		new GetterTester()
	).with(
		new DefaultValuesNullTester()
	).build();
}
 
开发者ID:liferay,项目名称:com-liferay-apio-architect,代码行数:20,代码来源:POJOTest.java

示例2: testPojoStructureAndBehavior

import com.openpojo.validation.test.impl.DefaultValuesNullTester; //导入依赖的package包/类
@Test
public void testPojoStructureAndBehavior() {
	Validator validator = ValidatorBuilder.create()
                          // Add Rules to validate structure for POJO_PACKAGE
                          // See com.openpojo.validation.rule.impl for more ...
                          .with(new GetterMustExistRule())
                          // Add Testers to validate behaviour for POJO_PACKAGE
                          // See com.openpojo.validation.test.impl for more ...
                          .with(new GetterTester())
                          .with(new DefaultValuesNullTester())
                          .build();
	for (String pojoPackage : POJO_PACKAGE) {
		LOGGER.info("Testing package: {}", pojoPackage);
		validator.validate(pojoPackage, new FilterPackageInfo());
	}
}
 
开发者ID:phenopolis,项目名称:pheno4j,代码行数:17,代码来源:PojoTest.java

示例3: setUp

import com.openpojo.validation.test.impl.DefaultValuesNullTester; //导入依赖的package包/类
@Before
public void setUp() {
	AttributeHelper.registerFieldPrefix("_");

	_validator = ValidatorBuilder.create(
	).with(
		new NoStaticExceptFinalRule()
	).with(
		new NoFieldShadowingRule()
	).with(
		new NoPublicFieldsRule()
	).with(
		new DefaultValuesNullTester()
	).build();
}
 
开发者ID:liferay,项目名称:com-liferay-apio-architect,代码行数:16,代码来源:ThrowableTest.java

示例4: testPojoStructureAndBehavior

import com.openpojo.validation.test.impl.DefaultValuesNullTester; //导入依赖的package包/类
@Test
public final void testPojoStructureAndBehavior() {

    final PojoClass pc = PojoClassFactory.getPojoClass(Target.class);

    final PojoValidator pv = new PojoValidator();

    pv.addRule(new NoPublicFieldsRule());
    pv.addRule(new NoFieldShadowingRule());

    pv.addTester(new DefaultValuesNullTester());
    pv.addTester(new SetterTester());
    pv.addTester(new GetterTester());

    pv.runValidation(pc);

}
 
开发者ID:fuinorg,项目名称:srcgen4j-commons,代码行数:18,代码来源:TargetTest.java

示例5: createPojoValidator

import com.openpojo.validation.test.impl.DefaultValuesNullTester; //导入依赖的package包/类
/**
 * Creates a configured POJO validator.
 * 
 * @return New instance.
 */
protected final PojoValidator createPojoValidator() {

    final PojoValidator pv = new PojoValidator();

    pv.addRule(new NoPublicFieldsRule());
    pv.addRule(new NoFieldShadowingRule());

    pv.addTester(new DefaultValuesNullTester());
    pv.addTester(new GetterTester());

    return pv;
}
 
开发者ID:fuinorg,项目名称:srcgen4j-commons,代码行数:18,代码来源:AbstractTest.java


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