Exemple #1
0
 public async Task CanDownloadAndDetectFormatOfLogFromTheWeb()
 {
     await app.SynchronizationContext.InvokeAndAwait(async() =>
     {
         await app.EmulateUrlDragAndDrop(samples.GetSampleAsUri("XmlWriterTraceListener1.xml").ToString());
         await app.WaitFor(IsXmlWriterTraceListenerLogIsLoaded);
     });
 }
        public async Task CanQuitAppWhileHavingActivePreprocessingUserInteraction(TestAppInstance app)
        {
            var preprocTask = app.EmulateUrlDragAndDrop(app.Samples.GetSampleAsUri("XmlWriterTraceListenerAndTextWriterTraceListener.zip"));

            await app.WaitFor(() => app.ViewModel.PreprocessingUserInteractions.DialogData != null);

            Check.That(app.ViewModel.PreprocessingUserInteractions.DialogData.Items.Count).IsEqualTo(2);

            await app.Dispose();
        }
Exemple #3
0
        public async Task WhenLogIsOpenALogHistoryEntryIsAdded(TestAppInstance app)
        {
            Check.That(app.ModelObjects.RecentlyUsedLogs.GetMRUListSize()).IsEqualTo(0);

            await app.EmulateFileDragAndDrop(await app.Samples.GetSampleAsLocalFile("XmlWriterTraceListener1.xml"));

            Check.That(app.ModelObjects.RecentlyUsedLogs.GetMRUListSize()).IsEqualTo(1);

            await app.EmulateUrlDragAndDrop(app.Samples.GetSampleAsUri("XmlWriterTraceListener1.xml"));

            Check.That(app.ModelObjects.RecentlyUsedLogs.GetMRUListSize()).IsEqualTo(2);
        }
        public async Task CanQuitAppWhilePreprocessingIsActive(TestAppInstance app)
        {
            var downloadingPreprocessing = app.EmulateUrlDragAndDrop(app.Samples.GetSampleAsUri("chrome_debug_1.log"));

            await app.Dispose();

            Check.That(downloadingPreprocessing.IsFaulted).IsTrue();
            var webEx = downloadingPreprocessing.Exception.InnerException as System.Net.WebException;

            Check.That(webEx).IsNotNull();
            Check.That(webEx.Status).IsEqualTo(System.Net.WebExceptionStatus.RequestCanceled);
        }
Exemple #5
0
        public async Task WhenLogIsOpenALogHistoryEntryIsAdded()
        {
            await app.SynchronizationContext.InvokeAndAwait(async() =>
            {
                Assert.AreEqual(0, app.Model.RecentlyUsedLogs.GetMRUListSize());

                await app.EmulateFileDragAndDrop(await samples.GetSampleAsLocalFile("XmlWriterTraceListener1.xml"));

                Assert.AreEqual(1, app.Model.RecentlyUsedLogs.GetMRUListSize());

                await app.EmulateUrlDragAndDrop(samples.GetSampleAsUri("XmlWriterTraceListener1.xml").ToString());
                Assert.AreEqual(2, app.Model.RecentlyUsedLogs.GetMRUListSize());
            });
        }
        public async Task CanDownloadZipExtractFindManyKnownLogsAndAskUserWhatToOpen(TestAppInstance app)
        {
            var preprocTask = app.EmulateUrlDragAndDrop(app.Samples.GetSampleAsUri("XmlWriterTraceListenerAndTextWriterTraceListener.zip"));

            await app.WaitFor(() => app.ViewModel.PreprocessingUserInteractions.DialogData != null);

            var userQueryItems = app.ViewModel.PreprocessingUserInteractions.DialogData.Items;

            Check.That(userQueryItems.Count).IsEqualTo(2);
            Check.That(userQueryItems.Any(x => x.Title.Contains("Microsoft\\XmlWriterTraceListener") && x.Title.Contains("XmlWriterTraceListenerAndTextWriterTraceListener.zip\\XmlWriterTraceListener1.xml"))).IsTrue();
            Check.That(userQueryItems.Any(x => x.Title.Contains("Microsoft\\TextWriterTraceListener") && x.Title.Contains("XmlWriterTraceListenerAndTextWriterTraceListener.zip\\TextWriterTraceListener.log"))).IsTrue();
            Check.That(preprocTask.IsCompleted).IsFalse();

            app.ViewModel.PreprocessingUserInteractions.OnCloseDialog(accept: true);
            await preprocTask;
        }
        public async Task CanDownloadZipExtractAndFindKnownLogFormatInArchive(TestAppInstance app)
        {
            await app.EmulateUrlDragAndDrop(app.Samples.GetSampleAsUri("XmlWriterTraceListener1AndImage.zip"));

            await app.WaitFor(() => IsXmlWriterTraceListenerLogIsLoaded(app));
        }
        public async Task CanDownloadAndDetectFormatOfLogFromTheWeb(TestAppInstance app)
        {
            await app.EmulateUrlDragAndDrop(app.Samples.GetSampleAsUri("XmlWriterTraceListener1.xml"));

            await app.WaitFor(() => IsXmlWriterTraceListenerLogIsLoaded(app));
        }
Exemple #9
0
 Task IUtils.EmulateUriDragAndDrop(Uri uri) => app.EmulateUrlDragAndDrop(uri);