/// <summary> /// Creates a report writer for the specified report. /// </summary> /// <param name="report">The report.</param> /// <param name="reportContainer">The report container.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="report"/> or <paramref name="reportContainer"/> is null.</exception> public DefaultReportWriter(Report report, IReportContainer reportContainer) { if (report == null) throw new ArgumentNullException(@"report"); if (reportContainer == null) throw new ArgumentNullException(@"reportContainer"); this.report = report; this.reportContainer = reportContainer; reportDocumentPaths = new List<string>(); attachmentPathResolver = new AttachmentPathResolver(reportContainer); }
/// <summary> /// Creates a report writer for the specified report. /// </summary> /// <param name="report">The report.</param> /// <param name="reportContainer">The report container.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="report"/> or <paramref name="reportContainer"/> is null.</exception> public DefaultReportWriter(Report report, IReportContainer reportContainer) { if (report == null) { throw new ArgumentNullException(@"report"); } if (reportContainer == null) { throw new ArgumentNullException(@"reportContainer"); } this.report = report; this.reportContainer = reportContainer; reportDocumentPaths = new List <string>(); attachmentPathResolver = new AttachmentPathResolver(reportContainer); }
public void SetUp() { reportContainer = MockRepository.GenerateStub<IReportContainer>(); reportContainer.Stub(rc => rc.EncodeFileName(Arg<string>.Is.Anything)).Do(new Func<string, string>(s => s)); attachmentPathResolver = new AttachmentPathResolver(reportContainer); }