本文整理汇总了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.");
}
示例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.");
}