Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 3
0
        public void GetValueOfCustomCode_NullCodeInfo_ReturnsEmptyString()
        {
            var result = formatter.GetCustomCodeValue(null);

            Assert.Equal(string.Empty, result);
        }