Exemplo n.º 1
0
        public async Task InvalidName_ValidationException(int locationNameLength)
        {
            var locationName = new string('x', locationNameLength);
            var command      = new CreateLocationCommand {
                Name = locationName
            };
            var validator = new CreateLocationCommandValidator();

            var result = await validator.ValidateAsync(command);

            Assert.NotNull(result);
            Assert.False(result.IsValid);
        }
 public void TestInitialize()
 {
     _validator = new CreateLocationCommandValidator();
 }
Exemplo n.º 3
0
 public CreateLocationCommandValidatorTests()
 {
     this.createValidator = new CreateLocationCommandValidator();
     this.createCommand   = new CreateLocationCommand();
 }