public void TagsArrayCanBeNull()
        {
            // Arrange
            CreateFoodTruckModel model = new CreateFoodTruckModel()
            {
                Name        = "Food Truck Name",
                Description = "Some very interesting description",
                Website     = @"http://www.foodtruck.com",
                Tags        = null
            };

            // Act
            CreateFoodTruckModelValidator validator = new CreateFoodTruckModelValidator();
            var result = validator.Validate(model);

            // Assert
            result.IsValid.Should().BeTrue();
        }
        public void FoodTruckWithNullNameFails()
        {
            // Arrange
            CreateFoodTruckModel model = new CreateFoodTruckModel()
            {
                Name        = null,
                Description = "Some very interesting description",
                Website     = @"http://www.foodtruck.com",
                Tags        = new List <string>()
                {
                    "Burgers", "Sandwiches"
                }
            };

            // Act
            CreateFoodTruckModelValidator validator = new CreateFoodTruckModelValidator();
            var result = validator.Validate(model);

            // Assert
            result.IsValid.Should().BeFalse();
        }
        public void TagsArrayCannotContainInvalidEntries()
        {
            // Arrange
            CreateFoodTruckModel model = new CreateFoodTruckModel()
            {
                Name        = "Food Truck Name",
                Description = "Some very interesting description",
                Website     = @"http://www.foodtruck.com",
                Tags        = new List <string>()
                {
                    "Burgers", "Pizza@"
                }
            };

            // Act
            CreateFoodTruckModelValidator validator = new CreateFoodTruckModelValidator();
            var result = validator.Validate(model);

            // Assert
            result.IsValid.Should().BeFalse();
        }
        public void InvalidWebsitesFail(String website)
        {
            // Arrange
            CreateFoodTruckModel model = new CreateFoodTruckModel()
            {
                Name        = "Food Truck Name",
                Description = "Some very interesting description",
                Website     = website,
                Tags        = new List <string>()
                {
                    "Burgers", "Sandwiches"
                }
            };

            // Act
            CreateFoodTruckModelValidator validator = new CreateFoodTruckModelValidator();
            var result = validator.Validate(model);

            // Assert
            result.IsValid.Should().BeFalse();
        }