コード例 #1
0
        public void DenyRecipeAboveSpecificMinutesForCooking2()
        {
            var constraint = new За("20 минути");
            var recipe     = new Recipe()
            {
                MinutesRequiredToCook = 22
            };

            Assert.IsFalse(constraint.IsAllowed(recipe));
        }
コード例 #2
0
        public void DenyRecipeAboveSpecificHoursForCooking3()
        {
            var constraint = new За("1 ЧАСА");
            var recipe     = new Recipe()
            {
                MinutesRequiredToCook = 999
            };

            Assert.IsFalse(constraint.IsAllowed(recipe));
        }
コード例 #3
0
        public void AllowRecipeUnderSpecificMinutesForCooking4()
        {
            var constraint = new За("15 МИН");
            var recipe     = new Recipe()
            {
                MinutesRequiredToCook = 10
            };

            Assert.IsTrue(constraint.IsAllowed(recipe));
        }
コード例 #4
0
        public void AllowRecipeAboveSpecificHoursForCooking3()
        {
            var constraint = new За("2 ЧАСА");
            var recipe     = new Recipe()
            {
                MinutesRequiredToCook = 30
            };

            Assert.IsTrue(constraint.IsAllowed(recipe));
        }