Commit Graph

3 Commits

Author SHA1 Message Date
Jon Skeet 6656b5c123 Implement validation for CloudEventAttributeType.String
Signed-off-by: Jon Skeet <jonskeet@google.com>
2021-03-04 22:48:19 +00:00
Jon Skeet 7d01a4a181 Fix URI parsing on Linux
This still leaves a hole where the user created a Uri instance
manually on Linux and it claims to be absolute, but it would
potentially be confusing to spot this in Validate as well...

Signed-off-by: Jon Skeet <jonskeet@google.com>
2021-02-11 07:57:38 +00:00
Jon Skeet 78dd8416b0 Add tests, primarily for CloudEvent, CloudEventAttribute and CloudEventAttributeType
Each of these classes has 100% coverage just by running their own tests.
There are still some areas of concern:

- .NET's URI parsing and formatting seems hard to predict, so we're not validating as much as I'd like
- There are some interesting questions about CloudEvent behavior which are tested in a "QuestionableBehavior" nested class in CloudEventTest

There's a fair amount of production code changing in here as well, primarily around validation.

Signed-off-by: Jon Skeet <jonskeet@google.com>
2021-02-11 07:57:38 +00:00