File tree Expand file tree Collapse file tree 3 files changed +3
-65
lines changed
test/kotlin/graphql/kickstart/tools Expand file tree Collapse file tree 3 files changed +3
-65
lines changed Original file line number Diff line number Diff line change 1313
1414 <properties >
1515 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
16- <java .version>8</java .version>
16+ <java .version>1. 8</java .version>
1717 <kotlin .version>1.8.21</kotlin .version>
1818 <kotlin-coroutines .version>1.7.3</kotlin-coroutines .version>
1919 <jackson .version>2.15.3</jackson .version>
286286 <artifactId >maven-compiler-plugin</artifactId >
287287 <version >3.11.0</version >
288288 <configuration >
289- <source >11 </source >
290- <target >11 </target >
289+ <source >${java.version} </source >
290+ <target >${java.version} </target >
291291 </configuration >
292292 </plugin >
293293
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11package graphql.kickstart.tools
22
3- import graphql.ExceptionWhileDataFetching
43import graphql.GraphQL
54import graphql.execution.AsyncExecutionStrategy
65import graphql.schema.GraphQLSchema
@@ -14,43 +13,6 @@ import java.util.*
1413 */
1514class InaccessibleFieldResolverTest {
1615
17- @Test
18- fun `private field from closed module is not accessible` () {
19- val schema: GraphQLSchema = SchemaParser .newParser()
20- .schemaString(
21- """
22- type Query {
23- locale: Locale
24- }
25-
26- type Locale {
27- country: String!
28- languageTag: String!
29- }
30- """ )
31- .resolvers(Query ())
32- .build()
33- .makeExecutableSchema()
34- val gql: GraphQL = GraphQL .newGraphQL(schema)
35- .queryExecutionStrategy(AsyncExecutionStrategy ())
36- .build()
37-
38- val result = gql.execute(
39- """
40- query {
41- locale {
42- country
43- languageTag
44- }
45- }
46- """
47- )
48-
49- assertEquals(result.errors.size, 1 )
50- val exceptionWhileDataFetching = result.errors[0 ] as ExceptionWhileDataFetching
51- assert (exceptionWhileDataFetching.exception is IllegalAccessException )
52- }
53-
5416 @Test
5517 fun `private field from closed module is accessible through resolver` () {
5618 val schema: GraphQLSchema = SchemaParser .newParser()
You can’t perform that action at this time.
0 commit comments