public void CreateClassRenderer_Xml_NewInstanceIsCreated()
        {
            var factory = new RendererFactory(ReportType.Xml);

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

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

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

            Assert.AreSame(renderer1, renderer2, "Singleton instance expected.");
            Assert.IsInstanceOfType(renderer1, typeof(LatexRenderer), "Wrong type returned.");
        }
Example #3
0
        public void CreateClassRenderer_Latex_SingletonIsReturned()
        {
            var factory = new RendererFactory(ReportTypes.Latex);

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

            Assert.AreSame(renderer1, renderer2, "Singleton instance expected.");
            Assert.IsInstanceOfType(renderer1, typeof(LatexRenderer), "Wrong type returned.");
        }
Example #4
0
        public void CreateClassRenderer_Xml_NewInstanceIsCreated()
        {
            var factory = new RendererFactory(ReportTypes.Xml);

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

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

            var renderer = factory.CreateClassRenderer();

            Assert.IsNull(renderer, "Null expected.");
        }
        public void CreateClassRenderer_LatexSummary_SingletonIsReturned()
        {
            var factory = new RendererFactory(ReportType.LatexSummary);

            var renderer = factory.CreateClassRenderer();

            Assert.IsNull(renderer, "Null expected.");
        }
Example #7
0
        public void CreateClassRenderer_SeveralReportType_CorrectNumberIsReturned()
        {
            var factory = new RendererFactory(ReportTypes.Latex | ReportTypes.Xml | ReportTypes.Html);

            Assert.AreEqual(3, GetInnerRenderers(factory.CreateClassRenderer()).Count(), "Wrong number of renderers.");
        }
Example #8
0
        public void CreateClassRenderer_LatexSummary_NoInstanceIsReturned()
        {
            var factory = new RendererFactory(ReportTypes.LatexSummary);

            Assert.IsTrue(!GetInnerRenderers(factory.CreateClassRenderer()).Any(), "No renderer expected.");
        }