Fix typo in resource string
Signed-off-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
This commit is contained in:
parent
7debdc1513
commit
9c52e6c85e
|
@ -70,7 +70,7 @@ namespace CloudNative.CloudEvents {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The 'contenttype' attribute value must be a content-type expression compliant with RFC2046.
|
||||
/// Looks up a localized string similar to The 'datacontenttype' attribute value must be a content-type expression compliant with RFC2046.
|
||||
/// </summary>
|
||||
internal static string ErrorContentTypeIsNotRFC2046 {
|
||||
get {
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
<value>Null values cannot be added as attributes</value>
|
||||
</data>
|
||||
<data name="ErrorContentTypeIsNotRFC2046" xml:space="preserve">
|
||||
<value>The 'contenttype' attribute value must be a content-type expression compliant with RFC2046</value>
|
||||
<value>The 'datacontenttype' attribute value must be a content-type expression compliant with RFC2046</value>
|
||||
</data>
|
||||
<data name="ErrorContentTypeUnspecified" xml:space="preserve">
|
||||
<value>The 'datacontenttype' attribute value must be specified</value>
|
||||
|
|
|
@ -29,6 +29,14 @@ namespace CloudNative.CloudEvents.UnitTests
|
|||
Assert.StartsWith(Strings.ErrorContentTypeUnspecified, exception.Message);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
void Invalid_ContentType_Throws()
|
||||
{
|
||||
var cloudEvent = CreateEmptyCloudEvent();
|
||||
var exception = Assert.Throws<InvalidOperationException>(() => cloudEvent.GetAttributes().Add("datacontenttype", "text/html; charset: windows-1255"));
|
||||
Assert.StartsWith(Strings.ErrorContentTypeIsNotRFC2046, exception.Message);
|
||||
}
|
||||
|
||||
static CloudEvent CreateEmptyCloudEvent() =>
|
||||
new CloudEvent(CloudEventsSpecVersion.V1_0, "type",
|
||||
new Uri("https://source"), "subject", "id", DateTime.UtcNow);
|
||||
|
|
Loading…
Reference in New Issue