예제 #1
0
        public void ObterBDList_planilha_UIC865_Test()
        {
            //Arrange
            IReadExcelService svc = new ReadExcelService();
            var fileName          = "UIC865.xlsx";
            var fullPath          = $"../../../Mock/ModeloBd/{fileName}";

            //Act
            var bds = svc.ReadFile_BD(fullPath);

            //Assert
            Assert.NotNull(bds);
            Assert.True(bds.Count == 7);
        }
예제 #2
0
        public void ObterBDList_planilha_W150x13_Test()
        {
            //Arrange
            IReadExcelService svc = new ReadExcelService();
            var fileName          = "W150x13.xlsx";
            var fullPath          = $"../../../Mock/ModeloBd/{fileName}";

            //Act
            var bds = svc.ReadFile_BD(fullPath);

            //Assert
            Assert.NotNull(bds);
            Assert.True(bds[0].numero_passe == 1);
            Assert.True(bds.Count == 8);
        }
예제 #3
0
        public void ObterBDList_planilha_com_dois_bds_Test()
        {
            //Arrange
            IReadExcelService svc = new ReadExcelService();
            var fileName          = "Planilha_com_dois_bds.xlsx";
            var fullPath          = $"../../../Mock/ModeloBd/{fileName}";

            //Act
            var bds = svc.ReadFile_BD(fullPath);

            //Assert
            Assert.NotNull(bds);
            Assert.True(bds.Count == 7);
            //Assert.True(bds.GroupBy(g => g.index_bd).Count() == 2);
            Assert.Equal(bds[0].canal_posicao_stripper, "6/BOX1");
        }
예제 #4
0
        public void Erro_em_arredondamento_area_along_W150x13_Test()
        {
            //Arrange
            IReadExcelService svc = new ReadExcelService();
            var fileName          = "W150x13.xlsx";
            var fullPath          = $"../../../Mock/ModeloBd/{fileName}";

            //Act
            var bds = svc.ReadFile_BD(fullPath);

            //Assert
            Assert.NotNull(bds);
            Assert.True(bds.Count == 8);
            Assert.True(bds[0].area_along == 1.320);
            Assert.True(bds[1].area_along == 1.230);
            Assert.True(bds[2].area_along == 1.052);
            Assert.True(bds[3].area_along == 1.194);
            Assert.True(bds[4].area_along == 1.194);
        }
예제 #5
0
        public void Inversao_valores_forca_x_torque_W150x13_Test()
        {
            //Arrange
            IReadExcelService svc = new ReadExcelService();
            var fileName          = "W150x13.xlsx";
            var fullPath          = $"../../../Mock/ModeloBd/{fileName}";

            //Act
            var bds = svc.ReadFile_BD(fullPath);

            //Assert
            Assert.NotNull(bds);
            Assert.True(bds.Count == 8);

            Assert.True(bds[0].forca == 2351.8);
            Assert.True(bds[0].torque == 382.4);

            Assert.True(bds[1].forca == 1789.8);
            Assert.True(bds[1].torque == 245.2);

            Assert.True(bds[2].forca == 2238.2);
            Assert.True(bds[2].torque == 386.2);
        }
예제 #6
0
        public void Validacao_valores_todas_as_colunas_W150x13_Test()
        {
            //Arrange
            IReadExcelService svc = new ReadExcelService();
            var fileName          = "W150x13.xlsx";
            var fullPath          = $"../../../Mock/ModeloBd/{fileName}";

            //Act
            var bds = svc.ReadFile_BD(fullPath);

            //Assert
            Assert.NotNull(bds);
            Assert.True(bds.Count == 8);

            Assert.True(bds[3].canal_posicao_stripper_entrada == "q");
            Assert.True(bds[3].canal_posicao_stripper == "4/E");
            Assert.True(string.IsNullOrWhiteSpace(bds[3].canal_posicao_stripper_saida));
            Assert.True(bds[3].giro == "N");
            Assert.True(bds[3].tipo == "H");
            Assert.True(bds[3].alma_espes == 80);
            Assert.True(bds[3].alma_dh == 25);
            Assert.True(bds[3].luz == 18);
            Assert.True(bds[3].pass_line == 85);
            Assert.True(bds[3].perfil_largura == 185);
            Assert.True(bds[3].perfil_altura == 169);
            Assert.True(bds[3].area_mm2 == 23282);
            Assert.True(bds[3].area_red == 16.2);
            Assert.True(bds[3].area_along == 1.194);
            Assert.True(bds[3].comp == 9.4);
            Assert.True(bds[3].dia_trab == 956);
            Assert.True(bds[3].velocidade_entrada == 1);
            Assert.True(bds[3].velocidade_laminacao == 4.4);
            Assert.True(bds[3].tempo_laminacao == 3.8);
            Assert.True(bds[3].tempo_morto == 4.0);
            Assert.True(bds[3].forca == 1372.1);
            Assert.True(bds[3].torque == 136.5);
        }