示例#1
0
        public void AppliesToCommand_PutOnShirtCommand_ReturnsTrue()
        {
            ShirtRule rule   = new ShirtRule();
            bool      result = rule.AppliesToCommand(typeof(PutOnShirtCommand));

            Assert.IsTrue(result);
        }
示例#2
0
        public void Evaluate_ShirtNotOn_ReturnsTrue()
        {
            Person    person = new Person();
            ShirtRule rule   = new ShirtRule();
            bool      result = rule.Evaluate(person, WeatherType.COLD);

            Assert.IsTrue(result);
        }
示例#3
0
        public void Evaluate_ShirtAlreadyOn_ReturnsFalse()
        {
            Person person = new Person();

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

            Assert.IsFalse(result);
        }