private void ErrorIsSet()
 {
     var error = new Error("id");
     var ex = new ValidationException(error);
     Assert.Equal(Defaults.ValidationException.Message, ex.Message);
     Assert.Same(error, ex.Error);
 }
 private void MessageIsSet()
 {
     var ex = new ValidationException("validation failed");
     Assert.Equal("validation failed", ex.Message);
     Assert.NotNull(ex.Error);
     Assert.Equal(1, ex.Error.Messages.Count());
     Assert.Equal("validation failed", ex.Error.Messages.First().Message);
 }
 private void PropertiesAreDefaulted()
 {
     var ex = new ValidationException();
     Assert.Equal(Defaults.ValidationException.Message, ex.Message);
     Assert.NotNull(ex.Error);
     Assert.Equal(1, ex.Error.Messages.Count());
     Assert.Equal(Defaults.ValidationException.Message, ex.Error.Messages.First().Message);
 }