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

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