예제 #1
0
        public void AfterAddTwoActions_NextActionIs_FirstAddedAction_Test()
        {
            Action action       = new Think();
            Action idleAction   = new IdleAction();
            Action wanderAction = new WanderAction();

            action.AddAction(idleAction);
            action.AddAction(wanderAction);
            Assert.True(action.NextAction().Equals(idleAction));
        }
예제 #2
0
        public void AfterAddTwoActions_HasTwoInList_Test()
        {
            Action action       = new Think();
            Action idleAction   = new IdleAction();
            Action wanderAction = new WanderAction();

            action.AddAction(idleAction);
            action.AddAction(wanderAction);
            Assert.Equal(2, action.ActionListCount());
        }
예제 #3
0
        public void RemoveAction_OnListWithTwoActions_CurrentActionIsFirstAddedAction_Test()
        {
            Action action       = new Think();
            Action idleAction   = new IdleAction();
            Action wanderAction = new WanderAction();

            action.AddAction(idleAction);
            action.AddAction(wanderAction);
            action.RemoveAction();
            Assert.True(action.CurrentAction().Equals(idleAction));
        }
예제 #4
0
        public void AfterAddAction_HasOneInList_Test()
        {
            Action action = new Think();

            action.AddAction(new IdleAction());
            Assert.Equal(1, action.ActionListCount());
        }
예제 #5
0
        public void AfterAddAction_HasAction_Test()
        {
            Action action     = new Think();
            Action idleAction = new IdleAction();

            action.AddAction(idleAction);
            Assert.True(action.CurrentAction().Equals(idleAction));
        }
예제 #6
0
        public void RemoveAction_OnListWithOneAction_Test()
        {
            Action action     = new Think();
            Action idleAction = new IdleAction();

            action.AddAction(idleAction);
            action.RemoveAction();
            Assert.Equal(0, action.ActionListCount());
        }