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


Java DateTypeConverter类代码示例

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


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

示例1: testSimpleFind

import net.sourceforge.stripes.validation.DateTypeConverter; //导入依赖的package包/类
@Test(groups="slow")
public void testSimpleFind() throws Exception {
    // Because the tests package depends on stripes, it's safe to assume that
    // there will be some TypeConverter subclasses in the classpath
    ResolverUtil<TypeConverter<?>> resolver = new ResolverUtil<TypeConverter<?>>();
    resolver.findImplementations(TypeConverter.class, "net");
    Set<Class<? extends TypeConverter<?>>> impls = resolver.getClasses();

    // Check on a few random converters
    Assert.assertTrue(impls.contains(BooleanTypeConverter.class),
                      "BooleanTypeConverter went missing.");
    Assert.assertTrue(impls.contains(DateTypeConverter.class),
                      "DateTypeConverter went missing.");
    Assert.assertTrue(impls.contains(BooleanTypeConverter.class),
                      "ShortTypeConverter went missing.");

    Assert.assertTrue(impls.size() >= 10,
                      "Did not find all the built in TypeConverters.");
}
 
开发者ID:scarcher2,项目名称:stripes,代码行数:20,代码来源:ResolverUtilTest.java

示例2: testMoreSpecificFind

import net.sourceforge.stripes.validation.DateTypeConverter; //导入依赖的package包/类
@Test(groups="fast")
public void testMoreSpecificFind() throws Exception {
    // Because the tests package depends on stripes, it's safe to assume that
    // there will be some TypeConverter subclasses in the classpath
    ResolverUtil<TypeConverter<?>> resolver = new ResolverUtil<TypeConverter<?>>();
    resolver.findImplementations(TypeConverter.class, "net.sourceforge.stripes.validation");
    Set<Class<? extends TypeConverter<?>>> impls = resolver.getClasses();

    // Check on a few random converters
    Assert.assertTrue(impls.contains(BooleanTypeConverter.class),
                      "BooleanTypeConverter went missing.");
    Assert.assertTrue(impls.contains(DateTypeConverter.class),
                      "DateTypeConverter went missing.");
    Assert.assertTrue(impls.contains(BooleanTypeConverter.class),
                      "ShortTypeConverter went missing.");

    Assert.assertTrue(impls.size() >= 10,
                      "Did not find all the built in TypeConverters.");
}
 
开发者ID:scarcher2,项目名称:stripes,代码行数:20,代码来源:ResolverUtilTest.java


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