Skip to content

Commit ecc6729

Browse files
committed
tests fix
1 parent 8007db3 commit ecc6729

File tree

6 files changed

+38
-38
lines changed

6 files changed

+38
-38
lines changed

src/main/java/graphql/annotations/dataFetchers/MethodDataFetcher.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
22
* Copyright 2016 Yurii Rashkovskii
3-
* <p>
3+
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
7-
* <p>
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
* <p>
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

src/main/java/graphql/annotations/processor/typeFunctions/TypeFunction.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
22
* Copyright 2016 Yurii Rashkovskii
3-
* <p>
3+
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
7-
* <p>
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
* <p>
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

src/test/java/graphql/annotations/GraphQLBatchedTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ public void init() {
4343
GraphQLAnnotations.getInstance().getTypeRegistry().clear();
4444
}
4545

46-
private static class SimpleBatchedField {
46+
public static class SimpleBatchedField {
4747
@GraphQLField
4848
@GraphQLBatched
4949
public static List<String> a() {
5050
return Arrays.asList("one", "two");
5151
}
5252
}
5353

54-
private static class TestBatchedObject {
54+
public static class TestBatchedObject {
5555
@GraphQLField
5656
public List<SimpleBatchedField> fields() {
5757
return Arrays.asList(new SimpleBatchedField(), new SimpleBatchedField());
@@ -78,7 +78,7 @@ public void batchedDataFetcher() throws Throwable {
7878
assertEquals(fields.get(1).get("a"), "two");
7979
}
8080

81-
private static class NoStaticBatchedField {
81+
public static class NoStaticBatchedField {
8282
@GraphQLField
8383
@GraphQLBatched
8484
public List<String> a() {
@@ -91,7 +91,7 @@ public void noStaticField() {
9191
GraphQLObjectType object = GraphQLAnnotations.object(NoStaticBatchedField.class);
9292
}
9393

94-
private static class NoListBatchedField {
94+
public static class NoListBatchedField {
9595
@GraphQLField
9696
@GraphQLBatched
9797
public String a() {
@@ -104,7 +104,7 @@ public void noListField() {
104104
GraphQLObjectType object = GraphQLAnnotations.object(NoStaticBatchedField.class);
105105
}
106106

107-
private static class NoParameterizedBatchedField {
107+
public static class NoParameterizedBatchedField {
108108
@GraphQLField
109109
@GraphQLBatched
110110
public List a() {

src/test/java/graphql/annotations/GraphQLInputTest.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public GraphQLObjectType getType(TypeResolutionEnvironment env) {
4646
}
4747
}
4848

49-
static class SubInputObject {
49+
public static class SubInputObject {
5050
public SubInputObject(@GraphQLName("subKey") String subKey) {
5151
this.subKey = subKey;
5252
}
@@ -55,7 +55,7 @@ public SubInputObject(@GraphQLName("subKey") String subKey) {
5555
private String subKey;
5656
}
5757

58-
static class InputObject {
58+
public static class InputObject {
5959
public InputObject(@GraphQLName("key") String key, @GraphQLName("complex") List<SubInputObject> complex) {
6060
this.key = key;
6161
this.complex = complex;
@@ -68,7 +68,7 @@ public InputObject(@GraphQLName("key") String key, @GraphQLName("complex") List<
6868
private List<SubInputObject> complex;
6969
}
7070

71-
static class RecursiveInputObject {
71+
public static class RecursiveInputObject {
7272
public RecursiveInputObject(@GraphQLName("map") HashMap map) {
7373
key = (String) map.get("key");
7474
if (map.containsKey("rec")) {
@@ -84,35 +84,35 @@ public RecursiveInputObject(@GraphQLName("map") HashMap map) {
8484
}
8585

8686
@GraphQLTypeResolver(Resolver.class)
87-
interface TestIface {
87+
public interface TestIface {
8888
@GraphQLField
8989
String value(@GraphQLName("input") InputObject input);
9090
}
9191

92-
static class TestObject implements TestIface {
92+
public static class TestObject implements TestIface {
9393

9494
@Override
9595
public String value(@GraphQLName("input") InputObject input) {
9696
return input.key + "a";
9797
}
9898
}
9999

100-
static class TestObjectList {
100+
public static class TestObjectList {
101101
@GraphQLField
102102
public String value(@GraphQLName("input") List<List<List<InputObject>>> input) {
103103
InputObject inputObject = input.get(0).get(0).get(0);
104104
return inputObject.key + "-" + inputObject.complex.get(0).subKey;
105105
}
106106
}
107107

108-
static class TestObjectRec {
108+
public static class TestObjectRec {
109109
@GraphQLField
110110
public String value(@GraphQLName("input") RecursiveInputObject input) {
111111
return (input.rec != null ? ("rec"+input.rec.key) : input.key) + "a";
112112
}
113113
}
114114

115-
static class Code {
115+
public static class Code {
116116
public Code(@GraphQLName("map") HashMap map) {
117117
this.firstField = (String) map.get("firstField");
118118
this.secondField = (String) map.get("secondField");
@@ -124,7 +124,7 @@ public Code(@GraphQLName("map") HashMap map) {
124124
public String secondField;
125125
}
126126

127-
static class QueryMultipleDefinitions {
127+
public static class QueryMultipleDefinitions {
128128
@GraphQLField
129129
public String something(@GraphQLName("code") Code code) {
130130
return code.firstField + code.secondField;
@@ -136,28 +136,28 @@ public String somethingElse(@GraphQLName("code") Code code) {
136136
}
137137
}
138138

139-
static class Query {
139+
public static class Query {
140140
@GraphQLField
141141
public TestIface object() {
142142
return new TestObject();
143143
};
144144
}
145145

146-
static class QueryRecursion {
146+
public static class QueryRecursion {
147147
@GraphQLField
148148
public TestObjectRec object() {
149149
return new TestObjectRec();
150150
};
151151
}
152152

153-
static class QueryList {
153+
public static class QueryList {
154154
@GraphQLField
155155
public TestObjectList object() {
156156
return new TestObjectList();
157157
};
158158
}
159159

160-
static class QueryIface {
160+
public static class QueryIface {
161161
@GraphQLField
162162
public TestObject iface() {
163163
return new TestObject();

src/test/java/graphql/annotations/GraphQLInterfaceTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,20 @@ public GraphQLObjectType getType(TypeResolutionEnvironment env) {
8080
}
8181

8282
@GraphQLTypeResolver(Resolver.class)
83-
interface BaseTestIface {
83+
public interface BaseTestIface {
8484
@GraphQLField
8585
String value();
8686
}
8787

8888
@GraphQLTypeResolver(Resolver.class)
89-
interface TestIface extends BaseTestIface {
89+
public interface TestIface extends BaseTestIface {
9090
}
9191

9292
@GraphQLUnion(possibleTypes = TestObject1.class)
93-
interface TestUnion extends BaseTestIface {
93+
public interface TestUnion extends BaseTestIface {
9494
}
9595

96-
static class TestObject implements TestIface {
96+
public static class TestObject implements TestIface {
9797

9898
@Override
9999
public String value() {
@@ -146,7 +146,7 @@ public Object get(DataFetchingEnvironment environment) {
146146
}
147147
}
148148

149-
static class Query {
149+
public static class Query {
150150
@GraphQLDataFetcher(IfaceFetcher.class)
151151
@GraphQLField
152152
public TestIface iface;

src/test/java/graphql/annotations/GraphQLObjectTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public Object get() {
7171

7272
@GraphQLDescription("TestObject object")
7373
@GraphQLName("TestObject")
74-
private static class TestObject {
74+
public static class TestObject {
7575
@GraphQLField
7676
@GraphQLName("field0")
7777
@GraphQLDescription("field")
@@ -221,7 +221,7 @@ public void fields() {
221221
assertTrue(fields.get(7).getType() instanceof graphql.schema.GraphQLNonNull);
222222
}
223223

224-
private static class TestObjectInherited extends TestObject {
224+
public static class TestObjectInherited extends TestObject {
225225
@Override
226226
@GraphQLName("field1") // Test overriding field
227227
public String field() {
@@ -245,7 +245,7 @@ public void methodInheritance() {
245245
assertEquals(((Map<String, Object>) result.getData()).get("field1"), "inherited");
246246
}
247247

248-
private static class TestObjectBridgMethodParent<Type> {
248+
public static class TestObjectBridgMethodParent<Type> {
249249
private final Type id;
250250

251251
public TestObjectBridgMethodParent(Type id) {
@@ -257,7 +257,7 @@ public Type id() {
257257
}
258258
}
259259

260-
private static class TestObjectBridgMethod extends TestObjectBridgMethodParent<Long> {
260+
public static class TestObjectBridgMethod extends TestObjectBridgMethodParent<Long> {
261261

262262
public TestObjectBridgMethod() {
263263
super(1L);
@@ -554,7 +554,7 @@ public void customTypeFunction() {
554554
assertEquals(object.getFieldDefinition("id").getType(), GraphQLString);
555555
}
556556

557-
private static class TestInputArgument {
557+
public static class TestInputArgument {
558558
@GraphQLField
559559
public String a;
560560
@GraphQLField
@@ -566,7 +566,7 @@ public TestInputArgument(@GraphQLName("a") String a, @GraphQLName("b") int b) {
566566
}
567567
}
568568

569-
private static class TestComplexInputArgument {
569+
public static class TestComplexInputArgument {
570570

571571
public Collection<TestInputArgument> inputs;
572572

@@ -583,7 +583,7 @@ public Collection<TestInputArgument> getInputs() {
583583

584584

585585

586-
private static class TestObjectInput {
586+
public static class TestObjectInput {
587587
@GraphQLField
588588
public String test(@GraphQLName("other") int other, @GraphQLName("arg") TestInputArgument arg) {
589589
return arg.a;

0 commit comments

Comments
 (0)