public void EmptyEnumerableOnNullData()
{
var emptySpan = Utils.CreateSpan("");
var dataProcessorInterface = typeof(IParsedDataProcessor<>);
var assembly = typeof(ClassificationType).Assembly;
var dataProcessors = assembly.GetTypes()
.Where(t => !t.IsAbstract)
.Where(t => t.GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == dataProcessorInterface))
.ToList();
foreach (var dataProcessorType in dataProcessors) {
var dataProcessor = Activator.CreateInstance(dataProcessorType);
var processDataMethod = dataProcessorType.GetMethod("ProcessData");
var result = (IEnumerable<ProcessedParsedData>)processDataMethod.Invoke(dataProcessor, new Object[] { emptySpan, null });
Assert.IsFalse(result.Any(), dataProcessorType.Name);
}
}