Ejemplo n.º 1
0
        public void TestMethod_02()
        {
            var exportClient = new ExportApiEndpoint(BASE_URL);
            var data         = exportClient.Get();

            Assert.IsTrue(data.Length > 0, "Export is failed");

            File.WriteAllBytes(EXPORT_FILE, data);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Export excel
        /// </summary>
        private static void Download(string file)
        {
            var exportClient = new ExportApiEndpoint(BASE_URL);
            var data         = exportClient.Get();

            File.WriteAllBytes(file, data);

            Console.WriteLine("Excel file '{0}' is ready!", file);

            try
            {
                Process.Start(file);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                throw;
            }
        }