public void FeedbackViewModel_Send_ServerlogFileAttachment_EmailHasServerLogFileAttachment()
        {
            var mockSysInfo = new Mock <ISystemInfoService>();

            mockSysInfo.Setup(sysInfo => sysInfo.GetSystemInfo()).Returns(GetMockSysInfo());
            CustomContainer.Register(mockSysInfo.Object);
            var mockCommService = new Mock <ICommService <EmailCommMessage> >();
            var actual          = new EmailCommMessage();

            mockCommService.Setup(c => c.SendCommunication(It.IsAny <EmailCommMessage>())).Callback <EmailCommMessage>(msg =>
            {
                actual = msg;
            });

            var attachmentPath = Path.Combine(_testDir, string.Format("FeedbackTest_{0}.txt", Guid.NewGuid()));

            File.WriteAllText(attachmentPath, @"test text");

            var attachedFiles = new Dictionary <string, string> {
                { "ServerLog", attachmentPath }
            };

            var feedbackViewModel = new FeedbackViewModel(attachedFiles);

            //------------Execute Test---------------------------
            feedbackViewModel.Send(mockCommService.Object);

            // Assert email has server log file attachment
            Assert.AreEqual(attachmentPath, actual.AttachmentLocation, "Wrong file attached");
        }
        /// <summary>
        /// Sends email info using the specified communication service.
        /// </summary>
        /// <param name="commService">The comm service.</param>
        /// <author>Jurie.smit</author>
        /// <datetime>2013/01/14-09:20 AM</datetime>
        /// <exception cref="System.NullReferenceException">ICommService of type EmailCommMessage</exception>
        public void Send(ICommService <EmailCommMessage> commService)
        {
            Dev2Logger.Log.Debug("");
            if (commService == null)
            {
                throw new NullReferenceException("ICommService<EmailCommMessage>");
            }

            var message = new EmailCommMessage
            {
                To      = StringResources.FeedbackEmail,
                Subject = String.Format("Some Real Live Feedback{0}{1}"
                                        , String.IsNullOrWhiteSpace(SelectedCategory) ? "" : " : ", SelectedCategory),
                Content = Comment
            };

            if (HasRecordingAttachment)
            {
                Attachments += !string.IsNullOrEmpty(RecordingAttachmentPath) ? RecordingAttachmentPath : "";
            }

            if (HasServerLogAttachment)
            {
                Attachments += !string.IsNullOrEmpty(Attachments) ? ";" : "";
                Attachments += !string.IsNullOrEmpty(ServerLogAttachmentPath) ? ServerLogAttachmentPath : "";
            }

            if (HasStudioLogAttachment)
            {
                Attachments += !string.IsNullOrEmpty(Attachments) ? ";" : "";
                Attachments += !string.IsNullOrEmpty(StudioLogAttachmentPath) ? StudioLogAttachmentPath : "";
            }

            message.AttachmentLocation = Attachments;
            commService.SendCommunication(message);
            RequestClose(ViewModelDialogResults.Okay);
        }