Example #1
0
        public void ExportDistributeWithCsvAsync()
        {
            var task = System.Threading.Tasks.Task.Factory.StartNew(() =>
            {
                bool completed = false;
                var csv        = String.Empty;

                var page = new FMWW.ScheduledArrival.DistributeExport.Ref.Page()
                {
                    UserAccount = UserAccount,
                    PageContext = Context
                };
                page.CsvDownloadCompleted += (result) =>
                {
                    csv       = result;
                    completed = true;
                };
                page.CsvAsync();

                // Actual test code here.
                while (!completed)
                {
                    System.Threading.Thread.Sleep(1000);
                }
                Debug.WriteLine(System.Threading.Thread.CurrentThread.ManagedThreadId);
                return(csv);
            }, System.Threading.Tasks.TaskCreationOptions.AttachedToParent);

            task.Wait();
            Verify4444(task.Result);
        }
Example #2
0
        public void ExportDistributeWithCsv()
        {
            var page = new FMWW.ScheduledArrival.DistributeExport.Ref.Page()
            {
                UserAccount = UserAccount,
                PageContext = Context
            };

            Verify4444(page.Csv());
        }