Index: test/DeltaShell/DeltaShell.Plugins.CommonTools.Tests/DeltaShell.Plugins.CommonTools.Tests.csproj =================================================================== diff -u -r94a72e46a5b6c508e4532436e96f10351aa73956 -ra3374ad8ea7f08e081519f22c3c1997754027498 --- test/DeltaShell/DeltaShell.Plugins.CommonTools.Tests/DeltaShell.Plugins.CommonTools.Tests.csproj (.../DeltaShell.Plugins.CommonTools.Tests.csproj) (revision 94a72e46a5b6c508e4532436e96f10351aa73956) +++ test/DeltaShell/DeltaShell.Plugins.CommonTools.Tests/DeltaShell.Plugins.CommonTools.Tests.csproj (.../DeltaShell.Plugins.CommonTools.Tests.csproj) (revision a3374ad8ea7f08e081519f22c3c1997754027498) @@ -90,7 +90,6 @@ - Fisheye: Tag a3374ad8ea7f08e081519f22c3c1997754027498 refers to a dead (removed) revision in file `test/DeltaShell/DeltaShell.Plugins.CommonTools.Tests/Forms/Charting/ChartLegendViewTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: test/DeltaShell/DeltaShell.Plugins.CommonTools.Tests/Forms/TextDocumentViewTest.cs =================================================================== diff -u -r8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9 -ra3374ad8ea7f08e081519f22c3c1997754027498 --- test/DeltaShell/DeltaShell.Plugins.CommonTools.Tests/Forms/TextDocumentViewTest.cs (.../TextDocumentViewTest.cs) (revision 8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9) +++ test/DeltaShell/DeltaShell.Plugins.CommonTools.Tests/Forms/TextDocumentViewTest.cs (.../TextDocumentViewTest.cs) (revision a3374ad8ea7f08e081519f22c3c1997754027498) @@ -1,9 +1,4 @@ -using System.ComponentModel; -using System.Linq; -using System.Threading; -using System.Windows.Forms; -using DelftTools.TestUtils; -using DelftTools.Utils; +using DelftTools.Utils; using DeltaShell.Plugins.CommonTools.Gui.Forms; using NUnit.Framework; @@ -13,65 +8,19 @@ public class TextDocumentViewTest { [Test] - [NUnit.Framework.Category(TestCategory.WindowsForms)] - public void ShowTextDocumentViewWithTextDocument() - { - var textDocument = new TextDocument(false) {Content = "qq1"}; - var textDocumentView = new TextDocumentView {Data = textDocument}; - - var textBox = textDocumentView.Controls.OfType().First(); //hacky - - Assert.AreEqual(textDocument.Content, textBox.Text); - WindowsFormsTestHelper.ShowModal(textDocumentView); - } - - [Test] - [NUnit.Framework.Category(TestCategory.WindowsForms)] - public void ShowTextDocumentUpdatingFromBackgroundWorker() - { - Control.CheckForIllegalCrossThreadCalls = true; - var textDocument = new TextDocument(false) {Content = "qq1"}; - - var view = new TextDocumentView { Data = textDocument }; - WindowsFormsTestHelper.Show(view); - var bgw = new BackgroundWorker(); - bgw.DoWork += (s, e) => - { - int i = 0; - while (i<100) - { - textDocument.Content += string.Format("aapjes"); - Thread.Sleep(100); - i++; - } - - }; - - - - - bgw.RunWorkerAsync(); - while (bgw.IsBusy) - { - Application.DoEvents(); - Thread.Sleep(100); - } - - } - - [Test] - [NUnit.Framework.Category(TestCategory.WindowsForms)] public void SetNullDataInDocumentView() { - var textDocument = new TextDocument(true); - textDocument.Content = "qq1"; + var textDocument = new TextDocument(true) + { + Content = "Lorem ipsum" + }; - var textDocumentView = new TextDocumentView(); + var textDocumentView = new TextDocumentView + { + Data = textDocument + }; - textDocumentView.Data = textDocument; - - //action! this should not cause an exception - textDocumentView.Data = null; + textDocumentView.Data = null; // Note: this should not cause an exception } } }