예제 #1
0
        public void GerarArquivo()
        {
            notaFiscal = new NotaFiscal();
            notaFiscal.EmitirNotaFiscal(pedido);

            string path     = ConfigurationManager.AppSettings["SavePath"];
            string filePath = $"{path}\\NF_{notaFiscal.NumeroNotaFiscal}.xml";

            try
            {
                string file = nfService.GerarArquivoXml(filePath, notaFiscal, new string[] { "NotaFiscal" }, new string[] { "ItensDaNotaFiscal" }, new string[] { "Item" });
                Assert.IsNotNull(file);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }