示例#1
0
 public void testExistingSequences()
 {
     Assert.AreEqual(ACTION_1,
                     agent.Execute(new DynamicPercept("key1", "value1")));
     Assert.AreEqual(ACTION_2,
                     agent.Execute(new DynamicPercept("key1", "value2")));
     Assert.AreEqual(ACTION_3,
                     agent.Execute(new DynamicPercept("key1", "value3")));
 }
示例#2
0
        public void TestNullAgentProgram()
        {
            DynamicAgent agent = new DynamicAgent();

            Assert.AreEqual(DynamicAction.NO_OP, agent.Execute(null));
            Assert.IsTrue(agent.IsAlive());
            agent.SetAlive(false);
            Assert.IsFalse(agent.IsAlive());
            Assert.IsInstanceOfType(agent, typeof(IAgent));
        }