Beispiel #1
0
        public void AppliesToCommand_PutOnPantsCommand_ReturnsTrue()
        {
            PajamasOffFirstRule rule = new PajamasOffFirstRule();
            bool result = rule.AppliesToCommand(typeof(PutOnPantsCommand));

            Assert.IsTrue(result);
        }
Beispiel #2
0
        public void Evaluate_PajamasStillOn_ReturnsFalse()
        {
            Person person            = new Person();
            PajamasOffFirstRule rule = new PajamasOffFirstRule();
            bool result = rule.Evaluate(person, WeatherType.HOT);

            Assert.IsFalse(result);
        }
Beispiel #3
0
        public void Evaluate_PajamasOff_ReturnsTrue()
        {
            Person person = new Person();

            person.Clothing.Clear();
            PajamasOffFirstRule rule = new PajamasOffFirstRule();
            bool result = rule.Evaluate(person, WeatherType.HOT);

            Assert.IsTrue(result);
        }