Пример #1
0
        public void AppliesToCommand_PutOnPantsCommand_ReturnsTrue()
        {
            PantsRule rule   = new PantsRule();
            bool      result = rule.AppliesToCommand(typeof(PutOnPantsCommand));

            Assert.IsTrue(result);
        }
Пример #2
0
        public void Evaluate_PantsNotOn_ReturnsTrue()
        {
            Person    person = new Person();
            PantsRule rule   = new PantsRule();
            bool      result = rule.Evaluate(person, WeatherType.COLD);

            Assert.IsTrue(result);
        }
Пример #3
0
        public void Evaluate_PantsAlreadyOn_ReturnsFalse()
        {
            Person person = new Person();

            person.Clothing.Add(new ClothingItem("", ClothingType.Pants));
            PantsRule rule   = new PantsRule();
            bool      result = rule.Evaluate(person, WeatherType.COLD);

            Assert.IsFalse(result);
        }