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); }
/// <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; } }