cz.cuni.amis.pogamut.sposh.engine
Class PoshEngineTest

Package class diagram package PoshEngineTest
java.lang.Object
  extended by org.junit.Assert
      extended by cz.cuni.amis.pogamut.sposh.elements.PlanTest
          extended by cz.cuni.amis.pogamut.sposh.engine.PoshEngineTest

public class PoshEngineTest
extends PlanTest

Tests covering PoshEngine and its execution.

Author:
Honza

Constructor Summary
PoshEngineTest()
           
 
Method Summary
 void test011VarConstPassed2Primitive()
          Test if primitive correctly recieves mix of variables and constants passed from posh plan.
 void test012New()
          We need better tools for evaluation.
 void test012TestAPProcessing()
          Test that actions in AP are called in sequenmce and when one fails, process is restarted
 void test013TestDC()
          Test that DC will correctly switch between three DE
 void test014Comparison()
           
 void test015APDouble()
          Test if AP in another AP is working as expected.
 void test016APDoubleFail()
          Ap in AP, one action in deeper AP fails.
 void test017MultiCE()
          Test if multiple CE in C are correctly evaluated.
 void test018MultiC()
          When everything is OK, I should get stuck in testC2 (no another DC to change)
 void test020SenseCtx()
          Test that variable context is properly passed into sense
 void test021TestEqualTrue()
           
 void test022TestAdopt()
           
 void testAPExecutor()
          Test if de will execute the ap
 void testDEFrequencyFail()
           
 void testGoalFulfilled()
           
 void testNestedAP()
          Test if order of actions will be OK in nested APs
 void testNestedAPFailure()
          Test what happens if action in inner ap of two nested APs fails. action2 will fail
 void testNoGoal()
          Test what happens if goal wasn't specified in the DC.
 void testParameterlessPrimitiveEvaluation()
          Test if primitive "dummyPrimitive" is evaluated and if has no variables in passed context.
 void testPassedConstantsInPrimitive()
          Test if constants passed from posh plan to primitives are what they are supposed to be.
 void testSimpleC()
           
 void testSimpleCRetry()
           
 
Methods inherited from class cz.cuni.amis.pogamut.sposh.elements.PlanTest
getMethodName, loadPlan, parsePlan
 
Methods inherited from class org.junit.Assert
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PoshEngineTest

public PoshEngineTest()
Method Detail

testGoalFulfilled

public void testGoalFulfilled()
                       throws IOException,
                              ParseException
Throws:
IOException
ParseException

testParameterlessPrimitiveEvaluation

public void testParameterlessPrimitiveEvaluation()
                                          throws IOException,
                                                 ParseException
Test if primitive "dummyPrimitive" is evaluated and if has no variables in passed context.

Throws:
IOException
ParseException

testDEFrequencyFail

public void testDEFrequencyFail()
                         throws IOException,
                                ParseException
Throws:
IOException
ParseException

testNoGoal

public void testNoGoal()
                throws IOException,
                       ParseException
Test what happens if goal wasn't specified in the DC. Expected: consider missing goal as always failing.

Throws:
IOException
ParseException

testAPExecutor

public void testAPExecutor()
                    throws IOException,
                           ParseException
Test if de will execute the ap

Throws:
IOException
ParseException

testPassedConstantsInPrimitive

public void testPassedConstantsInPrimitive()
                                    throws IOException,
                                           ParseException
Test if constants passed from posh plan to primitives are what they are supposed to be.

Throws:
IOException
ParseException

testNestedAP

public void testNestedAP()
                  throws IOException,
                         ParseException
Test if order of actions will be OK in nested APs

Throws:
IOException
ParseException

testNestedAPFailure

public void testNestedAPFailure()
                         throws IOException,
                                ParseException
Test what happens if action in inner ap of two nested APs fails. action2 will fail

Throws:
IOException
ParseException

testSimpleC

public void testSimpleC()
                 throws IOException,
                        ParseException
Throws:
IOException
ParseException

testSimpleCRetry

public void testSimpleCRetry()
                      throws IOException,
                             ParseException
Throws:
IOException
ParseException

test011VarConstPassed2Primitive

public void test011VarConstPassed2Primitive()
                                     throws IOException,
                                            ParseException
Test if primitive correctly recieves mix of variables and constants passed from posh plan.

Throws:
IOException
ParseException

test012TestAPProcessing

public void test012TestAPProcessing()
                             throws IOException,
                                    ParseException
Test that actions in AP are called in sequenmce and when one fails, process is restarted

Throws:
IOException
ParseException

test012New

public void test012New()
                throws IOException,
                       ParseException
We need better tools for evaluation. Repeat test 012 with new approach.

Throws:
IOException
ParseException

test013TestDC

public void test013TestDC()
                   throws IOException,
                          ParseException
Test that DC will correctly switch between three DE

Throws:
IOException
ParseException

test014Comparison

public void test014Comparison()
                       throws IOException,
                              ParseException
Throws:
IOException
ParseException

test015APDouble

public void test015APDouble()
                     throws IOException,
                            ParseException
Test if AP in another AP is working as expected. In this case, every action is OK (=doesn't fail)

Throws:
IOException
ParseException

test016APDoubleFail

public void test016APDoubleFail()
                         throws IOException,
                                ParseException
Ap in AP, one action in deeper AP fails. Does engine behave correctly?

Throws:
IOException
ParseException

test017MultiCE

public void test017MultiCE()
                    throws IOException,
                           ParseException
Test if multiple CE in C are correctly evaluated. I should choose ce2 (= highest ce with valid trigger), go into testAP and back to testC. Repeat 20x

Throws:
IOException
ParseException

test018MultiC

public void test018MultiC()
                   throws IOException,
                          ParseException
When everything is OK, I should get stuck in testC2 (no another DC to change)

Throws:
IOException
ParseException

test020SenseCtx

public void test020SenseCtx()
                     throws IOException,
                            ParseException
Test that variable context is properly passed into sense

Throws:
IOException
ParseException

test021TestEqualTrue

public void test021TestEqualTrue()
                          throws IOException,
                                 ParseException
Throws:
IOException
ParseException

test022TestAdopt

public void test022TestAdopt()
                      throws IOException,
                             ParseException
Throws:
IOException
ParseException


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.