|
@@ -23,16 +23,12 @@ namespace Terminal.Gui.Views {
|
|
|
// This is necessary because a) Application is a singleton and Init/Shutdown must be called
|
|
|
// as a pair, and b) all unit test functions should be atomic.
|
|
|
[AttributeUsage (AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
|
|
|
- public class InitShutdown : Xunit.Sdk.BeforeAfterTestAttribute {
|
|
|
+ public class TextViewTestsAutoInitShutdown : AutoInitShutdownAttribute {
|
|
|
|
|
|
public static string txt = "TAB to jump between text fields.";
|
|
|
public override void Before (MethodInfo methodUnderTest)
|
|
|
{
|
|
|
- if (_textView != null) {
|
|
|
- throw new InvalidOperationException ("After did not run.");
|
|
|
- }
|
|
|
-
|
|
|
- Application.Init (new FakeDriver ());
|
|
|
+ base.Before (methodUnderTest);
|
|
|
|
|
|
// 1 2 3
|
|
|
// 01234567890123456789012345678901=32 (Length)
|
|
@@ -48,12 +44,12 @@ namespace Terminal.Gui.Views {
|
|
|
public override void After (MethodInfo methodUnderTest)
|
|
|
{
|
|
|
_textView = null;
|
|
|
- Application.Shutdown ();
|
|
|
+ base.After (methodUnderTest);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Changing_Selection_Or_CursorPosition_Update_SelectedLength_And_SelectedText ()
|
|
|
{
|
|
|
_textView.SelectionStartColumn = 2;
|
|
@@ -70,7 +66,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Selection_With_Value_Less_Than_Zero_Changes_To_Zero ()
|
|
|
{
|
|
|
_textView.SelectionStartColumn = -2;
|
|
@@ -82,7 +78,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Selection_With_Value_Greater_Than_Text_Length_Changes_To_Text_Length ()
|
|
|
{
|
|
|
_textView.CursorPosition = new Point (2, 0);
|
|
@@ -95,7 +91,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Selection_With_Empty_Text ()
|
|
|
{
|
|
|
_textView = new TextView ();
|
|
@@ -109,7 +105,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Selection_And_CursorPosition_With_Value_Greater_Than_Text_Length_Changes_Both_To_Text_Length ()
|
|
|
{
|
|
|
_textView.CursorPosition = new Point (33, 2);
|
|
@@ -124,7 +120,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void CursorPosition_With_Value_Less_Than_Zero_Changes_To_Zero ()
|
|
|
{
|
|
|
_textView.CursorPosition = new Point (-1, -1);
|
|
@@ -135,7 +131,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void CursorPosition_With_Value_Greater_Than_Text_Length_Changes_To_Text_Length ()
|
|
|
{
|
|
|
_textView.CursorPosition = new Point (33, 1);
|
|
@@ -146,7 +142,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void WordForward_With_No_Selection ()
|
|
|
{
|
|
|
_textView.CursorPosition = new Point (0, 0);
|
|
@@ -209,7 +205,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void WordBackward_With_No_Selection ()
|
|
|
{
|
|
|
_textView.CursorPosition = new Point (_textView.Text.Length, 0);
|
|
@@ -272,7 +268,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void WordForward_With_Selection ()
|
|
|
{
|
|
|
_textView.CursorPosition = new Point (0, 0);
|
|
@@ -337,7 +333,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void WordBackward_With_Selection ()
|
|
|
{
|
|
|
_textView.CursorPosition = new Point (_textView.Text.Length, 0);
|
|
@@ -402,7 +398,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void WordForward_With_The_Same_Values_For_SelectedStart_And_CursorPosition_And_Not_Starting_At_Beginning_Of_The_Text ()
|
|
|
{
|
|
|
_textView.CursorPosition = new Point (10, 0);
|
|
@@ -451,7 +447,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void WordBackward_With_The_Same_Values_For_SelectedStart_And_CursorPosition_And_Not_Starting_At_Beginning_Of_The_Text ()
|
|
|
{
|
|
|
_textView.CursorPosition = new Point (10, 0);
|
|
@@ -492,7 +488,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void WordForward_With_No_Selection_And_With_More_Than_Only_One_Whitespace_And_With_Only_One_Letter ()
|
|
|
{
|
|
|
// 1 2 3 4 5
|
|
@@ -598,7 +594,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void WordBackward_With_No_Selection_And_With_More_Than_Only_One_Whitespace_And_With_Only_One_Letter ()
|
|
|
{
|
|
|
// 1 2 3 4 5
|
|
@@ -704,7 +700,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void WordBackward_Multiline_With_Selection ()
|
|
|
{
|
|
|
// 4 3 2 1
|
|
@@ -819,7 +815,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void WordForward_Multiline_With_Selection ()
|
|
|
{
|
|
|
// 1 2 3 4
|
|
@@ -933,7 +929,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Kill_To_End_Delete_Forwards_And_Copy_To_The_Clipboard ()
|
|
|
{
|
|
|
_textView.Text = "This is the first line.\nThis is the second line.";
|
|
@@ -976,7 +972,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Kill_To_Start_Delete_Backwards_And_Copy_To_The_Clipboard ()
|
|
|
{
|
|
|
_textView.Text = "This is the first line.\nThis is the second line.";
|
|
@@ -1020,7 +1016,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Kill_Delete_WordForward ()
|
|
|
{
|
|
|
_textView.Text = "This is the first line.";
|
|
@@ -1064,7 +1060,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Kill_Delete_WordBackward ()
|
|
|
{
|
|
|
_textView.Text = "This is the first line.";
|
|
@@ -1109,7 +1105,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Kill_Delete_WordForward_Multiline ()
|
|
|
{
|
|
|
_textView.Text = "This is the first line.\nThis is the second line.";
|
|
@@ -1189,7 +1185,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Kill_Delete_WordBackward_Multiline ()
|
|
|
{
|
|
|
_textView.Text = "This is the first line.\nThis is the second line.";
|
|
@@ -1269,7 +1265,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Copy_Or_Cut_Null_If_No_Selection ()
|
|
|
{
|
|
|
_textView.SelectionStartColumn = 0;
|
|
@@ -1281,7 +1277,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Copy_Or_Cut_Not_Null_If_Has_Selection ()
|
|
|
{
|
|
|
_textView.SelectionStartColumn = 20;
|
|
@@ -1294,7 +1290,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Copy_Or_Cut_And_Paste_With_Selection ()
|
|
|
{
|
|
|
_textView.SelectionStartColumn = 20;
|
|
@@ -1313,7 +1309,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Copy_Or_Cut_And_Paste_With_No_Selection ()
|
|
|
{
|
|
|
_textView.SelectionStartColumn = 20;
|
|
@@ -1348,7 +1344,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Cut_Not_Allowed_If_ReadOnly_Is_True ()
|
|
|
{
|
|
|
_textView.ReadOnly = true;
|
|
@@ -1369,7 +1365,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Paste_Always_Clear_The_SelectedText ()
|
|
|
{
|
|
|
_textView.SelectionStartColumn = 20;
|
|
@@ -1382,7 +1378,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void TextChanged_Event ()
|
|
|
{
|
|
|
_textView.TextChanged += () => {
|
|
@@ -1397,7 +1393,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void TextChanged_Event_NoFires_OnTyping ()
|
|
|
{
|
|
|
var eventcount = 0;
|
|
@@ -1413,7 +1409,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Used_Is_True_By_Default ()
|
|
|
{
|
|
|
_textView.CursorPosition = new Point (10, 0);
|
|
@@ -1429,7 +1425,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Used_Is_False ()
|
|
|
{
|
|
|
_textView.Used = false;
|
|
@@ -1446,7 +1442,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Copy_Without_Selection ()
|
|
|
{
|
|
|
_textView.Text = "This is the first line.\nThis is the second line.\n";
|
|
@@ -1465,7 +1461,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void TabWidth_Setting_To_Zero_Keeps_AllowsTab ()
|
|
|
{
|
|
|
Assert.Equal (4, _textView.TabWidth);
|
|
@@ -1484,7 +1480,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void AllowsTab_Setting_To_True_Changes_TabWidth_To_Default_If_It_Is_Zero ()
|
|
|
{
|
|
|
_textView.TabWidth = 0;
|
|
@@ -1500,7 +1496,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void AllowsReturn_Setting_To_True_Changes_Multiline_To_True_If_It_Is_False ()
|
|
|
{
|
|
|
Assert.True (_textView.AllowsReturn);
|
|
@@ -1522,7 +1518,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Multiline_Setting_Changes_AllowsReturn_AllowsTab_Height_WordWrap ()
|
|
|
{
|
|
|
Assert.True (_textView.Multiline);
|
|
@@ -1557,7 +1553,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Tab_Test_Follow_By_BackTab ()
|
|
|
{
|
|
|
Application.Top.Add (_textView);
|
|
@@ -1593,7 +1589,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void BackTab_Test_Follow_By_Tab ()
|
|
|
{
|
|
|
Application.Top.Add (_textView);
|
|
@@ -1636,7 +1632,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Tab_Test_Follow_By_CursorLeft_And_Then_Follow_By_CursorRight ()
|
|
|
{
|
|
|
Application.Top.Add (_textView);
|
|
@@ -1679,7 +1675,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Tab_Test_Follow_By_BackTab_With_Text ()
|
|
|
{
|
|
|
Application.Top.Add (_textView);
|
|
@@ -1715,7 +1711,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Tab_Test_Follow_By_Home_And_Then_Follow_By_End_And_Then_Follow_By_BackTab_With_Text ()
|
|
|
{
|
|
|
Application.Top.Add (_textView);
|
|
@@ -1773,7 +1769,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Tab_Test_Follow_By_CursorLeft_And_Then_Follow_By_CursorRight_With_Text ()
|
|
|
{
|
|
|
Application.Top.Add (_textView);
|
|
@@ -1976,7 +1972,7 @@ namespace Terminal.Gui.Views {
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void WordWrap_WrapModel_Output ()
|
|
|
{
|
|
|
// 0123456789
|
|
@@ -2059,7 +2055,7 @@ a
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void WordWrap_ReadOnly_CursorPosition_SelectedText_Copy ()
|
|
|
{
|
|
|
// 0123456789
|
|
@@ -2184,7 +2180,7 @@ line.
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void BottomOffset_Sets_To_Zero_Adjust_TopRow ()
|
|
|
{
|
|
|
string text = "";
|
|
@@ -2214,7 +2210,7 @@ line.
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void RightOffset_Sets_To_Zero_Adjust_leftColumn ()
|
|
|
{
|
|
|
string text = "";
|
|
@@ -2244,7 +2240,7 @@ line.
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void TextView_SpaceHandling ()
|
|
|
{
|
|
|
var tv = new TextView () {
|
|
@@ -2272,7 +2268,7 @@ line.
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void CanFocus_False_Wont_Focus_With_Mouse ()
|
|
|
{
|
|
|
var top = Application.Top;
|
|
@@ -2339,7 +2335,7 @@ line.
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void DesiredCursorVisibility_Vertical_Navigation ()
|
|
|
{
|
|
|
string text = "";
|
|
@@ -2378,7 +2374,7 @@ line.
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void DesiredCursorVisibility_Horizontal_Navigation ()
|
|
|
{
|
|
|
string text = "";
|
|
@@ -5898,7 +5894,7 @@ line.
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void Mouse_Button_Shift_Preserves_Selection ()
|
|
|
{
|
|
|
Assert.Equal ("TAB to jump between text fields.", _textView.Text);
|
|
@@ -6289,7 +6285,7 @@ This is the second line.
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void TextView_InsertText_Newline_LF ()
|
|
|
{
|
|
|
var tv = new TextView {
|
|
@@ -6358,7 +6354,7 @@ This is the second line.
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
- [InitShutdown]
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
public void TextView_InsertText_Newline_CRLF ()
|
|
|
{
|
|
|
var tv = new TextView {
|
|
@@ -6575,7 +6571,7 @@ This is the second line.
|
|
|
Assert.Equal ("Yay", tv.Text.ToString ());
|
|
|
}
|
|
|
|
|
|
- [Fact, InitShutdown]
|
|
|
+ [Fact, TextViewTestsAutoInitShutdown]
|
|
|
public void ContentsChanged_Event_Fires_Using_Kill_Delete_Tests ()
|
|
|
{
|
|
|
var eventcount = 0;
|
|
@@ -6602,7 +6598,7 @@ This is the second line.
|
|
|
}
|
|
|
|
|
|
|
|
|
- [Fact, InitShutdown]
|
|
|
+ [Fact, TextViewTestsAutoInitShutdown]
|
|
|
public void ContentsChanged_Event_Fires_Using_Copy_Or_Cut_Tests ()
|
|
|
{
|
|
|
var eventcount = 0;
|
|
@@ -6614,7 +6610,7 @@ This is the second line.
|
|
|
var expectedEventCount = 1;
|
|
|
|
|
|
// reset
|
|
|
- _textView.Text = InitShutdown.txt;
|
|
|
+ _textView.Text = TextViewTestsAutoInitShutdown.txt;
|
|
|
Assert.Equal (expectedEventCount, eventcount);
|
|
|
|
|
|
expectedEventCount += 3;
|
|
@@ -6623,7 +6619,7 @@ This is the second line.
|
|
|
|
|
|
// reset
|
|
|
expectedEventCount += 1;
|
|
|
- _textView.Text = InitShutdown.txt;
|
|
|
+ _textView.Text = TextViewTestsAutoInitShutdown.txt;
|
|
|
Assert.Equal (expectedEventCount, eventcount);
|
|
|
|
|
|
expectedEventCount += 3;
|
|
@@ -6632,7 +6628,7 @@ This is the second line.
|
|
|
|
|
|
// reset
|
|
|
expectedEventCount += 1;
|
|
|
- _textView.Text = InitShutdown.txt;
|
|
|
+ _textView.Text = TextViewTestsAutoInitShutdown.txt;
|
|
|
Assert.Equal (expectedEventCount, eventcount);
|
|
|
|
|
|
expectedEventCount += 1;
|
|
@@ -6641,7 +6637,7 @@ This is the second line.
|
|
|
|
|
|
// reset
|
|
|
expectedEventCount += 1;
|
|
|
- _textView.Text = InitShutdown.txt;
|
|
|
+ _textView.Text = TextViewTestsAutoInitShutdown.txt;
|
|
|
Assert.Equal (expectedEventCount, eventcount);
|
|
|
|
|
|
expectedEventCount += 1;
|
|
@@ -6650,7 +6646,7 @@ This is the second line.
|
|
|
|
|
|
// reset
|
|
|
expectedEventCount += 1;
|
|
|
- _textView.Text = InitShutdown.txt;
|
|
|
+ _textView.Text = TextViewTestsAutoInitShutdown.txt;
|
|
|
Assert.Equal (expectedEventCount, eventcount);
|
|
|
|
|
|
expectedEventCount += 4;
|
|
@@ -6659,7 +6655,7 @@ This is the second line.
|
|
|
|
|
|
// reset
|
|
|
expectedEventCount += 1;
|
|
|
- _textView.Text = InitShutdown.txt;
|
|
|
+ _textView.Text = TextViewTestsAutoInitShutdown.txt;
|
|
|
Assert.Equal (expectedEventCount, eventcount);
|
|
|
|
|
|
expectedEventCount += 4;
|
|
@@ -6667,7 +6663,7 @@ This is the second line.
|
|
|
Assert.Equal (expectedEventCount, eventcount);
|
|
|
}
|
|
|
|
|
|
- [Fact, InitShutdown]
|
|
|
+ [Fact, TextViewTestsAutoInitShutdown]
|
|
|
public void ContentsChanged_Event_Fires_On_Undo_Redo ()
|
|
|
{
|
|
|
var eventcount = 0;
|