示例#1
0
        public void GetDataConverter_Cached()
        {
            var converter1 = CloudEventConverters.GetDataConverter <EventData>();
            var converter2 = CloudEventConverters.GetDataConverter <EventData>();

            Assert.Same(converter1, converter2);
        }
示例#2
0
 public void GetDataConverter_NoAttribute() =>
 Assert.Throws <InvalidOperationException>(() => CloudEventConverters.GetDataConverter <NoAttributeData>());
示例#3
0
 public void GetDataConverter_WrongTargetType() =>
 Assert.Throws <InvalidOperationException>(() => CloudEventConverters.GetDataConverter <WrongTargetTypeData>());
示例#4
0
 public void GetDataConverter_DoesntImplementInterface() =>
 Assert.Throws <InvalidOperationException>(() => CloudEventConverters.GetDataConverter <NoImplementationData>());