private async void BeUniqueByName_Create_Not_Exists()
        {
            Mock <IAddressTypeRepository> addressTypeRepository = new Mock <IAddressTypeRepository>();

            addressTypeRepository.Setup(x => x.ByName(It.IsAny <string>())).Returns(Task.FromResult <AddressType>(null));
            var validator = new ApiAddressTypeRequestModelValidator(addressTypeRepository.Object);

            await validator.ValidateCreateAsync(new ApiAddressTypeRequestModel());

            validator.ShouldNotHaveValidationErrorFor(x => x.Name, "A");
        }
        public async void Name_Create_length()
        {
            Mock <IAddressTypeRepository> addressTypeRepository = new Mock <IAddressTypeRepository>();

            addressTypeRepository.Setup(x => x.Get(It.IsAny <int>())).Returns(Task.FromResult(new AddressType()));

            var validator = new ApiAddressTypeRequestModelValidator(addressTypeRepository.Object);
            await validator.ValidateCreateAsync(new ApiAddressTypeRequestModel());

            validator.ShouldHaveValidationErrorFor(x => x.Name, new string('A', 51));
        }