コード例 #1
0
        public void Evaluate_SocksNotOn_IsHot_ReturnsFalse()
        {
            Person    person = new Person();
            SocksRule rule   = new SocksRule();
            bool      result = rule.Evaluate(person, WeatherType.HOT);

            Assert.IsFalse(result);
        }
コード例 #2
0
        public void Evaluate_SocksNotOn_IsCold_ReturnsTrue()
        {
            Person    person = new Person();
            SocksRule rule   = new SocksRule();
            bool      result = rule.Evaluate(person, WeatherType.COLD);

            Assert.IsTrue(result);
        }
コード例 #3
0
        public void Evaluate_SocksOn_IsCold_ReturnsFalse()
        {
            Person person = new Person();

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

            Assert.IsFalse(result);
        }