Ejemplo n.º 1
0
 public void Setup()
 {
     _mockAction = new Mock <SomeAction>();
     _mockAction.Setup(x => x.Clone()).Returns(new SomeAction());
     _goal = new STRIPS.SimpleGoal(new STRIPS.Fact("OneParam", new STRIPS.ValueParameter(_obj)));
     _mockAction.Setup(x => x.GetAssignment(It.IsAny <STRIPS.Fact>(), It.IsAny <STRIPS.SimpleGoal>(), _currentBeliefs)).Returns(new Dictionary <string, object> {
         { "test", _obj }
     });
     _mockAction.Setup(x => x.IsApplicableForAdd(_goal, _currentBeliefs)).Returns(_fact);
     _result = _mockAction.Object.InstantiateFor(_goal, _currentBeliefs);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// The constructor with a linked action
 /// </summary>
 /// <param name="fact">The fact that is the goal state</param>
 /// <param name="action">The linked action used in substitution</param>
 public SimpleGoal(Fact fact, STRIPS.Action action)
 {
     Fact   = fact;
     Action = action;
 }
Ejemplo n.º 3
0
 public void Setup()
 {
     _fact   = new STRIPS.Fact("name");
     _action = new SomeAction();
     _result = new STRIPS.SimpleGoal(_fact, _action);
 }