24 package org.lightjason.agentspeak.action.builtin;
26 import org.junit.Assert;
27 import org.junit.Test;
36 import java.util.ArrayList;
37 import java.util.List;
38 import java.util.stream.Collectors;
39 import java.util.stream.Stream;
53 final List<ITerm> l_return =
new ArrayList<>();
57 Stream.of( 1, 1, 1, 2, 2.5, 0.5, 1 ).map(
CRawTerm::from ).collect( Collectors.toList() ),
61 Assert.assertEquals( l_return.size(), 2 );
62 Assert.assertFalse( l_return.get( 0 ).<Boolean>raw() );
63 Assert.assertTrue( l_return.get( 1 ).<Boolean>raw() );
72 final List<ITerm> l_return =
new ArrayList<>();
76 Stream.of( 0, 0, 100, 100, 40, 55, 100, 120 ).map(
CRawTerm::from ).collect( Collectors.toList() ),
80 Assert.assertEquals( l_return.size(), 2 );
81 Assert.assertTrue( l_return.get( 0 ).<Boolean>raw() );
82 Assert.assertFalse( l_return.get( 1 ).<Boolean>raw() );
91 final List<ITerm> l_return =
new ArrayList<>();
95 Stream.of( 250, 220, 25, 275, 40, 55, 60, 170, 310, 129 ).map(
CRawTerm::from ).collect( Collectors.toList() ),
99 Assert.assertEquals( l_return.size(), 2 );
100 Assert.assertTrue( l_return.get( 0 ).<Boolean>raw() );
101 Assert.assertFalse( l_return.get( 1 ).<Boolean>raw() );
final IFuzzyValue< Boolean > execute(final boolean p_parallel, @Nonnull final IContext p_context, @Nonnull final List< ITerm > p_argument, @Nonnull final List< ITerm > p_return)
defines a plan-body operation
final void inrechtangle()
test in rechtangle
base test class with helpers
IContext EMPTYPLAN
empty context with plan
test math shape functions
action check if a point within a rectangle.
execution context with local data
action check if a point is within a triangle.
final IFuzzyValue< Boolean > execute(final boolean p_parallel, @Nonnull final IContext p_context, @Nonnull final List< ITerm > p_argument, @Nonnull final List< ITerm > p_return)
defines a plan-body operation
action check if a point is within a circle.
final IFuzzyValue< Boolean > execute(final boolean p_parallel, @Nonnull final IContext p_context, @Nonnull final List< ITerm > p_argument, @Nonnull final List< ITerm > p_return)
defines a plan-body operation
final void intriangle()
test in triangle
static< N > CRawTerm< N > from(final N p_value)
factory for a raw term
term structure for simple datatypes
final void incircle()
test in circle