Exemplo n.º 1
0
        public PugRenderingTestsFixture()
        {
            var optionsMock = new Mock <IOptions <PugzorViewEngineOptions> >();

            optionsMock.SetupGet(q => q.Value)
            .Returns(new PugzorViewEngineOptions
            {
                // true: makes a lot of tests to fail
                Pretty = false
            });

            var mockServices       = new Mock <IServiceProvider>();
            var nodeServiceOptions = new NodeServicesOptions(mockServices.Object)
            {
                ProjectPath = TemporaryDirectoryHelper.CreateTemporaryDirectory(true)
            };
            var nodeServices = NodeServicesFactory.CreateNodeServices(nodeServiceOptions);

            Renderer = new PugRendering(nodeServices, optionsMock.Object);
        }
Exemplo n.º 2
0
 public PugzorView(string path, IPugRendering pugRendering)
 {
     _path         = path;
     _pugRendering = pugRendering;
 }
Exemplo n.º 3
0
 public PugzorTagHelper(IPugRendering pugRendering)
 {
     _pugRendering = pugRendering;
 }
Exemplo n.º 4
0
 public PugzorViewEngine(IPugRendering pugRendering, IOptions <PugzorViewEngineOptions> optionsAccessor)
 {
     _options      = optionsAccessor?.Value ?? throw new ArgumentNullException(nameof(optionsAccessor));
     _pugRendering = pugRendering;
 }