提交 0b7faf69 编写于 作者: 梦境迷离's avatar 梦境迷离

fix style

上级 e6629f81
......@@ -124,7 +124,7 @@ public class ValueMapper {
private String mapEnum(MappingContext mappingContext, EnumValue value, Type<?> graphQLType) {
if (graphQLType == null) {
Map<String, String> customTypesMapping = mappingContext.getCustomTypesMapping();
if(customTypesMapping.containsKey(value.getName())) {
if (customTypesMapping.containsKey(value.getName())) {
return customTypesMapping.get(value.getName());
}
......
......@@ -121,7 +121,8 @@ class GraphQLCodegenAnnotationsTest {
@Test
void generate_CustomAnnotationMappings_With_Annotations() throws Exception {
mappingConfig.setCustomTypesMapping(new HashMap<>(singletonMap("CAMS", "com.intuit.identity.manage.enum.CamsGroup::class")));
mappingConfig.setCustomTypesMapping(new HashMap<>(
singletonMap("CAMS", "com.intuit.identity.manage.enum.CamsGroup::class")));
mappingConfig.setDirectiveAnnotationsMapping(new HashMap<>(singletonMap("NotNull",
singletonList("@javax.validation.constraints.NotNull(message = {{message}}, groups = {{groups}})"))));
......@@ -129,7 +130,8 @@ class GraphQLCodegenAnnotationsTest {
File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
assertFileContainsElements(files, "TrustAccountInput.kt",
"@field:javax.validation.constraints.NotNull(message = \"test\", groups = com.intuit.identity.manage.enum.CamsGroup::class)");
"@field:javax.validation.constraints.NotNull(message = \"test\", " +
"groups = com.intuit.identity.manage.enum.CamsGroup::class)");
}
private void generate(String path) throws IOException {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册