public void PropertyNameSetAllOtherParametersAreNull()
        {
            // Arrange
            var validator = new LocalizedListValidator(null, "PropertyName", null, null, null);

            // Act
            validator.Validate(controller.ModelState);

            // Assert
            controller.ModelState.IsValid.Should().BeTrue();
        }
        public void ModelIsNullAndAvailableLanguagesSet()
        {
            // Arrange
            var validator = new LocalizedListValidator(null, "PropertyName", null, null, new List <string>()
            {
                "language1"
            });

            // Act
            validator.Validate(controller.ModelState);

            // Assert
            controller.ModelState.IsValid.Should().BeTrue();
        }
        public void ModelAndAvailableLanguagesSetAndStateInvalid(string language)
        {
            // Arrange
            var validator = new LocalizedListValidator(list, "PropertyName", null, null, new List <string>()
            {
                language
            });

            // Act
            validator.Validate(controller.ModelState);

            // Assert
            controller.ModelState.IsValid.Should().BeFalse();
        }
        public void ModelAndAvailableLanguagesAndTypeSetAndStateValid(string type)
        {
            // Arrange
            var validator = new LocalizedListValidator(list, "PropertyName", new List <string>()
            {
                "language1", "language2"
            }, new List <string> {
                type
            }, null);

            // Act
            validator.Validate(controller.ModelState);

            // Assert
            controller.ModelState.IsValid.Should().BeTrue();
        }