24 package org.lightjason.agentspeak.action.builtin;
26 import org.junit.Assert;
27 import org.junit.Test;
37 import java.util.ArrayList;
38 import java.util.List;
39 import java.util.stream.Collectors;
40 import java.util.stream.Stream;
55 final List<ITerm> l_return =
new ArrayList<>();
70 ).collect( Collectors.toList() ),
75 Assert.assertEquals( l_return.size(), 1 );
76 Assert.assertTrue( l_return.get( 0 ) instanceof
ILiteral );
77 Assert.assertEquals( l_return.get( 0 ).<
ILiteral>raw().
functor(),
"graphql" );
87 final List<ITerm> l_return =
new ArrayList<>();
95 CRawTerm.
from(
"{Product(id: \"cjdn6szou00dw25107gcuy114\") {id price name}}" ),
97 ).collect( Collectors.toList() ),
102 Assert.assertEquals( l_return.size(), 1 );
103 Assert.assertTrue( l_return.get( 0 ) instanceof
ILiteral );
104 Assert.assertEquals( l_return.get( 0 ).<
ILiteral>raw().
functor(),
"graphql" );
base test class with helpers
IContext EMPTYPLAN
empty context with plan
final void queryliteral()
run graphql query test with literal
action to run a graphql query by a native graphql query.
action to run graphql query by a literal.
execution context with local data
int structurehash()
returns a hash value which defines a hash ove rthe structure
String functor()
returns the functor without path
default generic literal class for agent beliefs a literal consists of a functor, an optional list of ...
static< N > CRawTerm< N > from(final N p_value)
factory for a raw term
static ILiteral from( @Nonnull final String p_functor, @Nullable final ITerm... p_values)
factory
final void querymanual()
run graphql query test with native query
term structure for simple datatypes