public void CanGenerateDataListFromBadImageFormatException() { // Arrange var badImageFormatException = new BadImageFormatException("message", "fileName"); // Act var result = badImageFormatException.ToDataList(); // Assert Assert.That(result.Count, Is.EqualTo(1)); Assert.That(result.Any(r => r.Key == "BadImageFormatException.FileName" && r.Value == "fileName")); }