public AsynchronousWorkerTests() { WpfTestCase.RequireWpfFact($"Tests are testing {nameof(AsynchronousSerialWorkQueue)} which is designed to run methods on the UI thread"); TestWorkspace.ResetThreadAffinity(); _foregroundSyncContext = SynchronizationContext.Current; Assert.NotNull(_foregroundSyncContext); }
public AsynchronousWorkerTests() { TestWorkspace.ResetThreadAffinity(); SynchronizationContext.SetSynchronizationContext(new DispatcherSynchronizationContext()); _foregroundSyncContext = SynchronizationContext.Current; Assert.NotNull(_foregroundSyncContext); }
public static IWpfTextView CreateView( string contentType, ExportProvider exportProvider, params string[] lines) { TestWorkspace.ResetThreadAffinity(); var buffer = CreateBuffer(contentType, exportProvider, lines); return(exportProvider.GetExportedValue <ITextEditorFactoryService>().CreateTextView(buffer)); }
public static DisposableTextView CreateView( string contentType, ExportProvider exportProvider, params string[] lines) { TestWorkspace.ResetThreadAffinity(); WpfTestCase.RequireWpfFact($"Creates an IWpfTextView through {nameof(EditorFactory)}.{nameof(CreateView)}"); var buffer = CreateBuffer(contentType, exportProvider, lines); return(exportProvider.GetExportedValue <ITextEditorFactoryService>().CreateDisposableTextView(buffer)); }
public ForegroundNotificationServiceTests() { TestWorkspace.ResetThreadAffinity(); _service = new ForegroundNotificationService(); }
public ForegroundNotificationServiceTests() { TestWorkspace.ResetThreadAffinity(); _service = TestExportProvider.ExportProviderWithCSharpAndVisualBasic.GetExportedValue <IForegroundNotificationService>(); }