Search in sources :

Example 6 with GraphQLDataFetcher

use of com.tvd12.ezyhttp.server.graphql.GraphQLDataFetcher in project ezyhttp by youngmonkeys.

the class GraphQLControllerTest method testNoNameDataFetcher.

@Test
public void testNoNameDataFetcher() {
    // given
    GraphQLDataFetcher nonameDataFetcher = new GraphQLNoNameDataFetcher();
    // when
    Throwable e = Asserts.assertThrows(() -> GraphQLDataFetcherManager.builder().addDataFetcher(nonameDataFetcher).build());
    // then
    Asserts.assertEquals(EzyNotImplementedException.class.toString(), e.getClass().toString());
}
Also used : EzyNotImplementedException(com.tvd12.ezyfox.exception.EzyNotImplementedException) GraphQLDataFetcher(com.tvd12.ezyhttp.server.graphql.GraphQLDataFetcher) Test(org.testng.annotations.Test)

Aggregations

GraphQLDataFetcher (com.tvd12.ezyhttp.server.graphql.GraphQLDataFetcher)6 Test (org.testng.annotations.Test)6 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)5 GraphQLDataFetcherManager (com.tvd12.ezyhttp.server.graphql.GraphQLDataFetcherManager)5 GraphQLController (com.tvd12.ezyhttp.server.graphql.controller.GraphQLController)5 GraphQLSchemaParser (com.tvd12.ezyhttp.server.graphql.GraphQLSchemaParser)4 GraphQLRequest (com.tvd12.ezyhttp.server.graphql.data.GraphQLRequest)3 EzyBeanContext (com.tvd12.ezyfox.bean.EzyBeanContext)1 EzyBeanContextBuilder (com.tvd12.ezyfox.bean.EzyBeanContextBuilder)1 EzySingletonFactory (com.tvd12.ezyfox.bean.EzySingletonFactory)1 EzyNotImplementedException (com.tvd12.ezyfox.exception.EzyNotImplementedException)1 GraphQLConfiguration (com.tvd12.ezyhttp.server.graphql.GraphQLConfiguration)1 GraphQLInvalidSchemeException (com.tvd12.ezyhttp.server.graphql.exception.GraphQLInvalidSchemeException)1 Field (java.lang.reflect.Field)1 Map (java.util.Map)1