public void GetDataConverter_Cached() { var converter1 = CloudEventConverters.GetDataConverter <EventData>(); var converter2 = CloudEventConverters.GetDataConverter <EventData>(); Assert.Same(converter1, converter2); }
public void GetDataConverter_NoAttribute() => Assert.Throws <InvalidOperationException>(() => CloudEventConverters.GetDataConverter <NoAttributeData>());
public void GetDataConverter_WrongTargetType() => Assert.Throws <InvalidOperationException>(() => CloudEventConverters.GetDataConverter <WrongTargetTypeData>());
public void GetDataConverter_DoesntImplementInterface() => Assert.Throws <InvalidOperationException>(() => CloudEventConverters.GetDataConverter <NoImplementationData>());