Exemple #1
0
        public void Should_Validate_Dish_With_Taken_Name()
        {
            var spec      = new DishNameTakenSpecification(CreateValidDish());
            var validDish = CreateValidDish();

            Assert.AreEqual(spec.IsSatisfiedBy(validDish), true);
        }
Exemple #2
0
        public void Should_Not_Validate_Dish_With_Avaible_Name()
        {
            var spec = new DishNameTakenSpecification(new Dish(_validName.ReverseString(), _validPrice, ValidRestaurant));

            Assert.AreEqual(spec.IsSatisfiedBy(CreateValidDish()), false);
        }
Exemple #3
0
        public void Should_Validate_Dish_With_Taken_Name_Upper_Case()
        {
            var spec = new DishNameTakenSpecification(new Dish(_validName.ToUpper(), _validPrice, ValidRestaurant));

            Assert.AreEqual(spec.IsSatisfiedBy(CreateValidDish()), true);
        }