예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:CSF.Screenplay.Reporting.HtmlReportWriter"/> class.
        /// </summary>
        /// <param name="writer">A text writer into which the report should be written.</param>
        /// <param name="disposeWriter">Indicates whether or not the <paramref name="writer"/> should be diposed with this instance.</param>
        public HtmlReportRenderer(TextWriter writer, bool disposeWriter = true)
        {
            if (writer == null)
            {
                throw new ArgumentNullException(nameof(writer));
            }

            this.writer        = writer;
            this.disposeWriter = disposeWriter;

            // TODO: Once the blocking issues are resolved, pass a hard coded configuration to the ZptDocumentFactory
            //
            // This is blocked by https://github.com/csf-dev/CSF.Screenplay/issues/141.
            // In turn, that is blocked by the upstream ZPT-Sharp issue https://github.com/csf-dev/ZPT-Sharp/issues/252
            // Once all of this is resolved, clients won't need to put all of their configuration for ZPT-Sharp
            // into their application configuration files. The code which achieves this is commented-out below:
            //
            // var pluginConfig = new HardCodedZptSharpConfigurationProvider();
            // documentFactory = new ZptDocumentFactory(new ZptDocumentProviderService(pluginConfig));

            documentFactory = new ZptDocumentFactory();
        }
예제 #2
0
        public void Setup()
        {
            _autofixture = new Fixture();

              _providerService = new Mock<IZptDocumentProviderService>(MockBehavior.Strict);
              _provider = new Mock<IZptDocumentProvider>();

              _sut = new ZptDocumentFactory(_providerService.Object);
        }
예제 #3
0
 static ZptView()
 {
     _documentFactory = new ZptDocumentFactory();
 }
예제 #4
0
        protected virtual void PerformDefaultSetup()
        {
            var fac = new ZptDocumentFactory();
              _documentFactory = fac;
              _templateFactory = fac;

              _settingsFactory = new RenderingSettingsFactory();
        }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CSF.Zpt.BatchRendering.RenderingJobFactory"/> class.
 /// </summary>
 /// <param name="documentFactory">Document factory.</param>
 public RenderingJobFactory(IZptDocumentFactory documentFactory = null)
 {
     _documentFactory = documentFactory?? new ZptDocumentFactory();
 }