public void should_validate_request()
        {
            var validator = new CreateExampleAggregateRequestValidator();

            validator.ShouldHaveValidationErrorFor(x => x.Id, null as Guid?);
            validator.ShouldHaveValidationErrorFor(x => x.Id, Guid.Empty);

            validator.ShouldHaveValidationErrorFor(x => x.Name, null as ExampleAggregateName);

            var nameValidator = new ExampleAggregateNameValidator();

            nameValidator.ShouldHaveValidationErrorFor(x => x.Name, null as string);
            nameValidator.ShouldHaveValidationErrorFor(x => x.Name, new string('a', ExampleRegistry.ExampleAggregateName.MaxLength + 10));

            nameValidator.ShouldHaveValidationErrorFor(x => x.Language, null as Language?);
            nameValidator.ShouldHaveValidationErrorFor(x => x.Language, (Language)666);

            var validRequest = new CreateExampleAggregateRequest
            {
                Id   = Guid.NewGuid(),
                Name = new ExampleAggregateName
                {
                    Name     = "Bla",
                    Language = Language.Dutch
                }
            };

            validator.ShouldNotHaveValidationErrorFor(x => x.Id, validRequest);
            validator.ShouldNotHaveValidationErrorFor(x => x.Name, validRequest);
            validator.ShouldNotHaveValidationErrorFor(x => x.Name.Name, validRequest);
            validator.ShouldNotHaveValidationErrorFor(x => x.Name.Language, validRequest);
        }
        public void should_validate_request()
        {
            var validator = new UpdateExampleAggregateRequestValidator();

            validator.ShouldHaveValidationErrorFor(x => x.Name, null as ExampleAggregateName);

            var nameValidator = new ExampleAggregateNameValidator();

            nameValidator.ShouldHaveValidationErrorFor(x => x.Name, null as string);
            nameValidator.ShouldHaveValidationErrorFor(x => x.Name, new string('a', ExampleRegistry.ExampleAggregateName.MaxLength + 10));

            nameValidator.ShouldHaveValidationErrorFor(x => x.Language, null as Language?);
            nameValidator.ShouldHaveValidationErrorFor(x => x.Language, (Language)666);

            var validRequest = new UpdateExampleAggregateRequest
            {
                Name = new ExampleAggregateName
                {
                    Name     = "Bla",
                    Language = Language.English
                }
            };

            validator.ShouldNotHaveValidationErrorFor(x => x.Name, validRequest);
            validator.ShouldNotHaveValidationErrorFor(x => x.Name.Name, validRequest);
            validator.ShouldNotHaveValidationErrorFor(x => x.Name.Language, validRequest);
        }