You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This unit test should be added to CheckBoxTests.cs:
[Fact,AutoInitShutdown]publicvoidAutoSize_StaysVisible(){varcheckBox=newCheckBox(){X=1,Y=Pos.Center(),Text="Check this out 你"};varwin=newWindow(){Width=Dim.Fill(),Height=Dim.Fill(),Title="Test Demo 你"};win.Add(checkBox);Application.Top.Add(win);Assert.False(checkBox.IsInitialized);varrunstate=Application.Begin(Application.Top);((FakeDriver)Application.Driver).SetBufferSize(30,5);Assert.True(checkBox.IsInitialized);Assert.Equal("Check this out 你",checkBox.Text);varexpected=@"┌ Test Demo 你 ──────────────┐│ ││ ╴ Check this out 你 ││ │└────────────────────────────┘";// Positive testvarpos=GraphViewTests.AssertDriverContentsWithFrameAre(expected,output);// Negative testcheckBox.AutoSize=true;boolfirst=false;Application.RunMainLoopIteration(refrunstate,true,reffirst);GraphViewTests.AssertDriverContentsWithFrameAre(expected,output);}
Output as of now:
Terminal.Gui.Views.CheckboxTests.AutoSize_StaysVisible
Source: CheckboxTests.cs line 72
Duration: 106 ms
Message:
Assert.Equal() Failure
↓ (pos 63)
Expected: ··· │\n│ ╴ Check this out 你 │\n│ ···
Actual: ··· │\n│ │\n│ ···
↑ (pos 63)
Stack Trace:
GraphViewTests.AssertDriverContentsWithFrameAre(String expectedLook, ITestOutputHelper output) line 208
CheckboxTests.AutoSize_StaysVisible() line 112
Standard Output:
Expected:
┌ Test Demo 你 ──────────────┐
│ │
│ ╴ Check this out 你 │
│ │
└────────────────────────────┘
But Was:
┌ Test Demo 你 ──────────────┐
│ │
│ ╴ Check this out 你 │
│ │
└────────────────────────────┘
Expected:
┌ Test Demo 你 ──────────────┐
│ │
│ ╴ Check this out 你 │
│ │
└────────────────────────────┘
But Was:
┌ Test Demo 你 ──────────────┐
│ │
│ │
│ │
└────────────────────────────┘
The text was updated successfully, but these errors were encountered:
This unit test should be added to
CheckBoxTests.cs
:Output as of now:
The text was updated successfully, but these errors were encountered: