These changes were generated automatically by running "Analyze and Code Cleanup".
Showing a diff ignoring whitespace shows the removal of the UTF-8 BOM from three files, but that's all.
Signed-off-by: Jon Skeet <jonskeet@google.com>
This requires a few nullable-reference-type overrides in tests where
we're absolutely confident they won't be null (and if we're wrong,
an NRE is fine to break the test).
Signed-off-by: Jon Skeet <jonskeet@google.com>
This is in the Core namespace as most users won't need it, and
instead of being exposed publicly on CloudEventAttributeType as a
property, it's available via a static method in a utility type in
the Core namespace. This effectively obscures it a little, while
still keeping it available to the formatter/protocol code it's
aimed at.
Signed-off-by: Jon Skeet <jonskeet@google.com>
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>
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>