public void FormatWritesTheReportWithTheDefaultAttachmentContentDispositionIfNoneSpecified()
        {
            IProgressMonitor progressMonitor = Mocks.Stub <IProgressMonitor>();
            IReportWriter    writer          = Mocks.StrictMock <IReportWriter>();

            using (Mocks.Record())
            {
                writer.SaveReport(AttachmentContentDisposition.Absent, progressMonitor);
            }

            using (Mocks.Playback())
            {
                XmlReportFormatter formatter = new XmlReportFormatter();
                var reportFormatterOptions   = new ReportFormatterOptions();

                formatter.Format(writer, reportFormatterOptions, progressMonitor);
            }
        }
        public void FormatWritesTheReportWithTheSpecifiedAttachmentContentDisposition()
        {
            IProgressMonitor progressMonitor = Mocks.Stub <IProgressMonitor>();
            IReportWriter    writer          = Mocks.StrictMock <IReportWriter>();

            using (Mocks.Record())
            {
                writer.SaveReport(AttachmentContentDisposition.Link, progressMonitor);
            }

            using (Mocks.Playback())
            {
                XmlReportFormatter     formatter = new XmlReportFormatter();
                ReportFormatterOptions options   = new ReportFormatterOptions();
                options.AddProperty(XmlReportFormatter.AttachmentContentDispositionOption, AttachmentContentDisposition.Link.ToString());

                formatter.Format(writer, options, progressMonitor);
            }
        }
示例#3
0
        /// <inheritdoc />
        public override void Format(IReportWriter reportWriter, ReportFormatterOptions options, IProgressMonitor progressMonitor)
        {
            AttachmentContentDisposition attachmentContentDisposition = GetAttachmentContentDisposition(options);

            reportWriter.SaveReport(attachmentContentDisposition, progressMonitor);
        }
        /// <inheritdoc />
        public override void Format(IReportWriter reportWriter, ReportFormatterOptions options, IProgressMonitor progressMonitor)
        {
            AttachmentContentDisposition attachmentContentDisposition = GetAttachmentContentDisposition(options);

            reportWriter.SaveReport(attachmentContentDisposition, progressMonitor);
        }