• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java FilterPackageInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: should_only_have_get_correct_pojo_in_bean_package

import com.openpojo.reflection.filters.FilterPackageInfo; //导入依赖的package包/类
@Test
public void should_only_have_get_correct_pojo_in_bean_package() {
    Validator validator = create()
            // Add Rules to validate structure for POJO_PACKAGE
            // See com.openpojo.validation.rule.impl for more ...
            .with(new GetterMustExistRule())
            .with(new SetterMustExistRule())
            .with(new NoPublicFieldsExceptStaticFinalRule())
            .with(new NoFieldShadowingRule())
            // Add Testers to validate behaviour for POJO_PACKAGE
            // See com.openpojo.validation.test.impl for more ...
            .with(new SetterTester())
            .with(new GetterTester())
            .build();

    validator.validate(POJO_PACKAGE, new FilterPackageInfo());
}
 
开发者ID:Eulbobo,项目名称:java-samples,代码行数:18,代码来源:PojoTest.java


示例2: testPojoStructureAndBehavior

import com.openpojo.reflection.filters.FilterPackageInfo; //导入依赖的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: testPojoStructureAndBehavior

import com.openpojo.reflection.filters.FilterPackageInfo; //导入依赖的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())
            .with(new SetterMustExistRule())
            // Add Testers to validate behaviour for POJO_PACKAGE
            // See com.openpojo.validation.test.impl for more ...
            .with(new SetterTester())
            .with(new GetterTester())
            .build();

    validator.validate("com.adyen.core.exceptions", new FilterPackageInfo());
}
 
开发者ID:Adyen,项目名称:adyen-android,代码行数:16,代码来源:ExceptionsUnitTest.java


示例4: testPojoStructureAndBehavior

import com.openpojo.reflection.filters.FilterPackageInfo; //导入依赖的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())
            .with(new SetterMustExistRule())
            // Add Testers to validate behaviour for POJO_PACKAGE
            // See com.openpojo.validation.test.impl for more ...
            .with(new SetterTester())
            .with(new GetterTester())
            .build();

    validator.validate("com.adyen.core.interfaces", new FilterPackageInfo());
}
 
开发者ID:Adyen,项目名称:adyen-android,代码行数:16,代码来源:InterfacesUnitTest.java


示例5: testPojoStructureAndBehavior

import com.openpojo.reflection.filters.FilterPackageInfo; //导入依赖的package包/类
@Test
public void testPojoStructureAndBehavior() {
    Validator validator = ValidatorBuilder.create()
            .with(new SetterTester())
            .with(new GetterTester())
            .build();

    validator.validate(POJO_PACKAGE, new FilterPackageInfo());
}
 
开发者ID:trivago,项目名称:cucable-plugin,代码行数:10,代码来源:PojoTest.java


示例6: should_get_proper_class_count_in_bean_package

import com.openpojo.reflection.filters.FilterPackageInfo; //导入依赖的package包/类
@Test
public void should_get_proper_class_count_in_bean_package() {
    // Attention avec ce test
    // il faut compter les classes du package, donc aussi les classes de test du même package
    // Pour ça que cette classe n'est pas dans le même package
    List<PojoClass> pojoClasses = PojoClassFactory.getPojoClasses(POJO_PACKAGE, new FilterPackageInfo());
    affirmEquals("Classes added / removed?", EXPECTED_CLASS_COUNT, pojoClasses.size());
}
 
开发者ID:Eulbobo,项目名称:java-samples,代码行数:9,代码来源:PojoTest.java


示例7: testPojoStructureAndBehavior

import com.openpojo.reflection.filters.FilterPackageInfo; //导入依赖的package包/类
@Test
public void testPojoStructureAndBehavior() {
    Validator validator = ValidatorBuilder.create()
            .with(new GetterMustExistRule())
            .with(new SetterMustExistRule())
            .with(new NoStaticExceptFinalRule())
            .with(new NoNestedClassRule())
            .with(new SetterTester())
            .with(new GetterTester())
            .build();
    validator.validate(DOMAIN_PACKAGE, new FilterPackageInfo());
}
 
开发者ID:hortonworks,项目名称:cloudbreak,代码行数:13,代码来源:ModelTest.java


示例8: ensureExpectedPojoCount

import com.openpojo.reflection.filters.FilterPackageInfo; //导入依赖的package包/类
@Test
public void ensureExpectedPojoCount() {
    List<PojoClass> pojoClasses = PojoClassFactory.getPojoClasses(POJO_PACKAGE,
            new FilterPackageInfo());
    Affirm.affirmEquals("Classes added / removed?", EXPECTED_CLASS_COUNT, pojoClasses.size());
}
 
开发者ID:trivago,项目名称:cucable-plugin,代码行数:7,代码来源:PojoTest.java


示例9: ensureExpectedPojoCount

import com.openpojo.reflection.filters.FilterPackageInfo; //导入依赖的package包/类
@Test
public void ensureExpectedPojoCount() {
    List<PojoClass> pojoClasses = PojoClassFactory.getPojoClasses(DOMAIN_PACKAGE, new FilterPackageInfo());
    Affirm.affirmEquals("Classes added / removed?", EXPECTED_CLASS_COUNT, pojoClasses.size());
}
 
开发者ID:hortonworks,项目名称:cloudbreak,代码行数:6,代码来源:ModelTest.java


示例10: pojocClassesForPackageName

import com.openpojo.reflection.filters.FilterPackageInfo; //导入依赖的package包/类
/**
 * creates parameters which are conform with a {@link AbstractPojoTest}, taking classes from below the given package
 * name and taking into account the given filters. The following filters are applied by default:
 * <ul>
 * <li>{@link FilterPackageInfo}: Ignores the package-info.java
 * <li>{@link ExcludeTestClassesFilter}: Ignores test classes
 * <li>{@link FilterCloverClasses}: Ignores all classes generated by clover instrumentation
 * <li>{@link FilterNestedClasses}: Ignores all nested classes
 * </ul>
 *
 * @param packageName the package name, from which to start searching for classes
 * @param classFilters the filters for the classes which will be used
 * @return a list of objects, which will represent a parameter array of className - class pairs. These can be
 *         directly used in a test which extends {@link AbstractPojoTest}.
 */
public static List<Class<?>> pojocClassesForPackageName(String packageName, PojoClassFilter... classFilters) {

    List<PojoClassFilter> filters = new ArrayList<>();
    filters.addAll(Arrays.asList(
            new PojoClassFilter[] { new FilterPackageInfo(), excludeTestClasses(), new FilterCloverClasses() }));
    filters.addAll(Arrays.asList(classFilters));

    List<PojoClass> pojoClasses = PojoClassFactory.getPojoClassesRecursively(packageName,
            new FilterChain(filters.toArray(new PojoClassFilter[] {})));

    return pojoClasses.stream().map(pc -> pc.getClazz()).collect(toList());
}
 
开发者ID:streamingpool,项目名称:streamingpool-core,代码行数:28,代码来源:PojoTests.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java KafkaAvroDecoder类代码示例发布时间:2022-05-23
下一篇:
Java MessageNotReadableException类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap