Пример #1
0
        public void TestResumenListaConUnCuadrado()
        {
            TranslatorService.Idioma = Enums.Idioma.ESP;
            var cuadrados = new List <FormaGeometrica> {
                new Cuadrado(5)
            };

            string resumen = PrinterService.Imprimir(cuadrados);

            Assert.AreEqual("<h1>Reporte de Formas</h1>1 Cuadrado | Area 25 | Perimetro 20 <br/>TOTAL:<br/>1 formas Perimetro 20 Area 25", resumen);
        }
Пример #2
0
        public void TestResumenListaConMasCuadrados()
        {
            var cuadrados = new List <FormaGeometrica>
            {
                new Cuadrado(5),
                new Cuadrado(1),
                new Cuadrado(3)
            };

            var resumen = PrinterService.Imprimir(cuadrados);

            Assert.AreEqual("<h1>Shapes report</h1>3 Squares | Area 35 | Perimeter 36 <br/>TOTAL:<br/>3 shapes Perimeter 36 Area 35", resumen);
        }
Пример #3
0
        public void TestResumenListaConMasTiposEnCastellano()
        {
            TranslatorService.Idioma = Enums.Idioma.ESP;
            var formas = new List <FormaGeometrica>
            {
                new Cuadrado(5),
                new Circulo(3),
                new TrianguloEquilatero(4),
                new Cuadrado(2),
                new TrianguloEquilatero(9),
                new Circulo(2.75m),
                new TrianguloEquilatero(4.2m)
            };

            var resumen = PrinterService.Imprimir(formas);

            Assert.AreEqual(
                "<h1>Reporte de Formas</h1>2 Cuadrados | Area 29 | Perimetro 28 <br/>2 Círculos | Area 13.01 | Perimetro 18.06 <br/>3 Triángulos | Area 49.64 | Perimetro 51.6 <br/>TOTAL:<br/>7 formas Perimetro 97.66 Area 91.65",
                resumen);
        }
Пример #4
0
        public void TestResumenListaConMasTipos()
        {
            TranslatorService.Idioma = Enums.Idioma.ENG;
            var formas = new List <FormaGeometrica>
            {
                new Cuadrado(5),
                new Circulo(3),
                new TrianguloEquilatero(4),
                new Cuadrado(2),
                new TrianguloEquilatero(9),
                new Circulo(2.75m),
                new TrianguloEquilatero(4.2m)
            };

            var resumen = PrinterService.Imprimir(formas);

            Assert.AreEqual(
                "<h1>Shapes report</h1>2 Squares | Area 29 | Perimeter 28 <br/>2 Circles | Area 13.01 | Perimeter 18.06 <br/>3 Triangles | Area 49.64 | Perimeter 51.6 <br/>TOTAL:<br/>7 shapes Perimeter 97.66 Area 91.65",
                resumen);
        }
Пример #5
0
 public void TestResumenListaVaciaFormasEnIngles()
 {
     TranslatorService.Idioma = Enums.Idioma.ENG;
     Assert.AreEqual("<h1>Empty list of shapes!</h1>", PrinterService.Imprimir(new List <FormaGeometrica>()));
 }
Пример #6
0
 public void TestResumenListaVacia()
 {
     TranslatorService.Idioma = Enums.Idioma.ESP;
     Assert.AreEqual("<h1>Lista vacía de formas!</h1>", PrinterService.Imprimir(new List <FormaGeometrica>()));
 }