本文整理汇总了Java中graphql.schema.Coercing类的典型用法代码示例。如果您正苦于以下问题:Java Coercing类的具体用法?Java Coercing怎么用?Java Coercing使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Coercing类属于graphql.schema包,在下文中一共展示了Coercing类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testStringTemporal
import graphql.schema.Coercing; //导入依赖的package包/类
private void testStringTemporal(Class type, Coercing coercing, String expected) {
Object parsed = coercing.parseLiteral(new StringValue(expected));
assertTrue(type.isInstance(parsed));
assertEquals(expected, coercing.serialize(parsed));
parsed = coercing.parseValue(expected);
assertTrue(type.isInstance(parsed));
assertEquals(expected, coercing.serialize(parsed));
Object same = coercing.parseValue(parsed);
assertEquals(parsed, same);
}
示例2: testEpochMilliTemporal
import graphql.schema.Coercing; //导入依赖的package包/类
private void testEpochMilliTemporal(Class type, Coercing coercing, String expected, long literal) {
Object parsed = coercing.parseLiteral(new IntValue(new BigInteger(Long.toString(literal))));
assertTrue(type.isInstance(parsed));
assertEquals(expected, coercing.serialize(parsed));
parsed = coercing.parseValue(literal);
assertTrue(type.isInstance(parsed));
assertEquals(expected, coercing.serialize(parsed));
}
示例3: testNullTemporalSerialization
import graphql.schema.Coercing; //导入依赖的package包/类
private void testNullTemporalSerialization(Coercing coercing) {
assertEquals(null, coercing.serialize(null));
}
示例4: getCoercing
import graphql.schema.Coercing; //导入依赖的package包/类
@Override
public Coercing getCoercing() {
return this.coercingExt;
}
示例5: getCoercingSuper
import graphql.schema.Coercing; //导入依赖的package包/类
public Coercing getCoercingSuper() {
return super.getCoercing();
}