Esempio n. 1
0
        public void CreateSummaryRenderer_XmlSummary_NewInstanceIsCreated()
        {
            var factory = new RendererFactory(ReportTypes.XmlSummary);

            var renderer1 = GetInnerRenderers(factory.CreateSummaryRenderer()).First();
            var renderer2 = GetInnerRenderers(factory.CreateSummaryRenderer()).First();

            Assert.AreNotSame(renderer1, renderer2, "New instance expected.");
            Assert.IsInstanceOfType(renderer1, typeof(XmlRenderer), "Wrong type returned.");
        }
Esempio n. 2
0
        public void CreateSummaryRenderer_LatexSummary_SingletonIsReturned()
        {
            var factory = new RendererFactory(ReportTypes.LatexSummary);

            var renderer1 = GetInnerRenderers(factory.CreateSummaryRenderer()).First();
            var renderer2 = GetInnerRenderers(factory.CreateSummaryRenderer()).First();

            Assert.AreSame(renderer1, renderer2, "Singleton instance expected.");
            Assert.IsInstanceOfType(renderer1, typeof(LatexRenderer), "Wrong type returned.");
        }
        public void CreateSummaryRenderer_Html_NewInstanceIsCreated()
        {
            var factory = new RendererFactory(ReportType.Html);

            var renderer1 = factory.CreateSummaryRenderer();
            var renderer2 = factory.CreateSummaryRenderer();

            Assert.AreNotSame(renderer1, renderer2, "New instance expected.");
            Assert.IsInstanceOfType(renderer1, typeof(HtmlRenderer), "Wrong type returned.");
        }
        public void CreateSummaryRenderer_Latex_SingletonIsReturned()
        {
            var factory = new RendererFactory(ReportType.Latex);

            var renderer1 = factory.CreateSummaryRenderer();
            var renderer2 = factory.CreateSummaryRenderer();

            Assert.AreSame(renderer1, renderer2, "Singleton instance expected.");
            Assert.IsInstanceOfType(renderer1, typeof(LatexRenderer), "Wrong type returned.");
        }