public WasteCodesViewModel(NotificationApplication notification, WasteCodeInfoFormatter wasteCodeInfoFormatter) { this.wasteCodeInfoFormatter = wasteCodeInfoFormatter; InitializeAllCodesToEmptyString(); SetBaselAndOecdCode(notification); Ewc = wasteCodeInfoFormatter.CodeListToString(notification.EwcCodes); Y = wasteCodeInfoFormatter.CodeListToString(notification.YCodes); H = wasteCodeInfoFormatter.CodeListToString(notification.HCodes); UnClass = wasteCodeInfoFormatter.CodeListToString(notification.UnClasses); Nce = wasteCodeInfoFormatter.GetCustomCodeValue(notification.ExportCode); Nci = wasteCodeInfoFormatter.GetCustomCodeValue(notification.ImportCode); Other = wasteCodeInfoFormatter.GetCustomCodeValue(notification.OtherCode); Customs = wasteCodeInfoFormatter.GetCustomCodeValue(notification.CustomsCode); SetUnNumbersAndShippingNames(notification); SetIsAnnexNeeded(); }
public void GetValueOfCustomCode_NullCodeInfo_ReturnsEmptyString() { var result = formatter.GetCustomCodeValue(null); Assert.Equal(string.Empty, result); }