public void ParseNull(CloudEventAttributeType type) =>
 Assert.Throws <ArgumentNullException>(() => type.Parse(null !));
示例#2
0
 public void GetOrdinal_NonNullInput(CloudEventAttributeType type) =>
 Assert.Equal(type.Ordinal, CloudEventAttributeTypes.GetOrdinal(type));
示例#3
0
 public void FormatNull(CloudEventAttributeType type) =>
 Assert.Throws <ArgumentNullException>(() => type.Format(null));
示例#4
0
 public void ValidateIncorrectType(CloudEventAttributeType type) =>
 Assert.Throws <ArgumentException>(() => type.Validate(new StringBuilder()));
示例#5
0
 /// <summary>
 /// Returns the <see cref="CloudEventAttributeTypeOrdinal"/> associated with <paramref name="type"/>,
 /// for convenient switching over attribute types.
 /// </summary>
 /// <param name="type">The attribute type. Must not be null.</param>
 /// <returns>The ordinal enum value associated with the attribute type.</returns>
 public static CloudEventAttributeTypeOrdinal GetOrdinal(CloudEventAttributeType type)
 {
     Validation.CheckNotNull(type, nameof(type));
     return(type.Ordinal);
 }