示例#1
0
        public void CommandList_GetCommand_FindPcCommand()
        {
            Mock <IPlayerCharacter> pc = new Mock <IPlayerCharacter>();

            IMobileObjectCommand command = commandList.GetCommand(pc.Object, "LOOK");

            Assert.AreEqual(typeof(Look), command.GetType());
        }
示例#2
0
        public void CommandList_GetCommand_GodCanRunGodCommand()
        {
            Mock <IPlayerCharacter> pc = new Mock <IPlayerCharacter>();

            pc.Setup(e => e.God).Returns(true);

            IMobileObjectCommand command = commandList.GetCommand(pc.Object, "ITEMSTATS");

            Assert.AreEqual(typeof(ItemStats), command.GetType());
        }
示例#3
0
        public void CommandList_GetCommand_LReturnsLook()
        {
            Mock <IPlayerCharacter> pc = new Mock <IPlayerCharacter>();

            pc.Setup(e => e.God).Returns(false);

            IMobileObjectCommand command = commandList.GetCommand(pc.Object, "L");

            Assert.AreEqual(typeof(Look), command.GetType());
        }