public void ModelIsValid_DescriptionSet()
        {
            // Arrange
            var language = "language";
            var vm       = new VmOpenApiGeneralDescriptionInVersionBase
            {
                Names = new List <VmOpenApiLocalizedListItem>
                {
                    new VmOpenApiLocalizedListItem
                    {
                        Language = language, Type = NameTypeEnum.Name.ToString(), Value = "TestValue"
                    }
                },
                Descriptions = new List <VmOpenApiLocalizedListItem>
                {
                    new VmOpenApiLocalizedListItem
                    {
                        Language = language, Type = DescriptionTypeEnum.Description.ToString(), Value = "TestValue"
                    },
                    new VmOpenApiLocalizedListItem
                    {
                        Language = language, Type = DescriptionTypeEnum.ShortDescription.ToString(), Value = "TestValue"
                    }
                }
            };
            var validator = new GeneralDescriptionValidator(vm, codeService, fintoService, new List <string> {
                language
            }, true);

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

            // Assert
            controller.ModelState.IsValid.Should().BeTrue();
        }
        public void DescriptionOrBackGroundDescriptionNotSet()
        {
            // Arrange
            var vm = new VmOpenApiGeneralDescriptionInVersionBase
            {
                Descriptions = new List <VmOpenApiLocalizedListItem>()
            };
            var validator = new GeneralDescriptionValidator(vm, codeService, fintoService, new List <string> {
                "language"
            }, true);

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

            // Assert
            controller.ModelState.IsValid.Should().BeFalse();
            controller.ModelState.ContainsKey("Descriptions").Should().BeTrue();
        }