public OperationViewModel(NotificationApplication notification, TechnologyEmployed technologyEmployed, OperationInfoFormatter formatter) { if (notification == null) { return; } reasonForExport = notification.ReasonForExport ?? string.Empty; OperationCodes = formatter.OperationInfosToCommaDelimitedList(notification.OperationInfos); if (technologyEmployed != null) { IsAnnexProvided = technologyEmployed.AnnexProvided; technologyEmployedDetails = technologyEmployed.Details ?? string.Empty; furtherDetails = technologyEmployed.FurtherDetails ?? string.Empty; } }
public void NullEnumerableReturnsEmptyString() { var result = formatter.OperationInfosToCommaDelimitedList(null); Assert.Equal(string.Empty, result); }