示例#1
0
        public void CommandCanAddRulesForEveryPossibleCombinationForAnElement()
        {
            ICommand command = new AddMultiComboCommand();

            Assert.IsTrue( command.AppliesTo( "*fire" ) );
        }
示例#2
0
        public void MultiCommandAddsRules()
        {
            ICommand command = new AddMultiComboCommand();
            var com = new TestCommunicator();
            var rs = new RuleSet()
            {
                FoundElements = new[] { new Element( "fire" ), new Element( "water" ) }
            };

            var c = new AlchemyController( rs );
            command.Run( "*fire", c, com );

            Assert.AreEqual( 2, rs.Rules.Length );
        }