示例#1
0
        public void CanAddImportCode()
        {
            var wasteCode = GetTestWasteCode(Guid.NewGuid(), CodeType.ImportCode);

            notification.SetImportCode(WasteCodeInfo.CreateWasteCodeInfo(wasteCode));

            Assert.NotNull(notification.ImportCode);
            Assert.Equal(CodeType.ImportCode, notification.ImportCode.WasteCode.CodeType);
        }
示例#2
0
        private static void SetWasteCodes(NotificationApplication notification, IList <WasteCode> wasteCodes)
        {
            notification.SetEwcCodes(new[]
            {
                WasteCodeInfo.CreateWasteCodeInfo(wasteCodes.First(wc => wc.CodeType == CodeType.Ewc))
            });

            notification.SetHCodes(new[]
            {
                WasteCodeInfo.CreateWasteCodeInfo(wasteCodes.First(wc => wc.CodeType == CodeType.H))
            });

            notification.SetYCodes(new[]
            {
                WasteCodeInfo.CreateWasteCodeInfo(wasteCodes.First(wc => wc.CodeType == CodeType.Y))
            });

            notification.SetUnClasses(new[]
            {
                WasteCodeInfo.CreateWasteCodeInfo(wasteCodes.First(wc => wc.CodeType == CodeType.Un))
            });

            notification.SetUnNumbers(new[]
            {
                WasteCodeInfo.CreateWasteCodeInfo(wasteCodes.First(wc => wc.CodeType == CodeType.UnNumber))
            });

            notification.SetCustomsCode(
                WasteCodeInfo.CreateCustomWasteCodeInfo(CodeType.CustomsCode,
                                                        "olives"));
            notification.SetImportCode(
                WasteCodeInfo.CreateCustomWasteCodeInfo(CodeType.ImportCode,
                                                        "cardboard boxes"));
            notification.SetExportCode(
                WasteCodeInfo.CreateCustomWasteCodeInfo(CodeType.ExportCode,
                                                        "gravel"));
        }