public static MotorCloudEvent <T> CreateTestCloudEvent <T>(T data, Uri?source = null) where T : class { var applicationNameService = new TestApplicationNameService(source); return(new MotorCloudEvent <T>(applicationNameService, data, applicationNameService.GetSource()) .SetMotorVersion()); }
public static MotorCloudEvent <T> CreateTestCloudEvent <T>(T data, Uri?source = null, IEnumerable <ICloudEventExtension>?extensions = null) where T : class { var applicationNameService = new TestApplicationNameService(source); return(new MotorCloudEvent <T>(applicationNameService, data, typeof(T).Name, applicationNameService.GetSource(), extensions: extensions?.ToArray() ?? Array.Empty <ICloudEventExtension>())); }