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

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