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 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 CodeListToString_Empty_ReturnsEmptyString() { var result = formatter.CodeListToString(new WasteCodeInfo[] { }); Assert.Equal(string.Empty, result); }