mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Reorg of unit tests
This commit is contained in:
36
UnitTests/Views/FrameViewTests.cs
Normal file
36
UnitTests/Views/FrameViewTests.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
|
||||
namespace Terminal.Gui.ViewTests {
|
||||
public class FrameViewTests {
|
||||
[Fact]
|
||||
public void Constuctors_Defaults ()
|
||||
{
|
||||
var fv = new FrameView ();
|
||||
Assert.Equal (string.Empty, fv.Title);
|
||||
Assert.Equal (string.Empty, fv.Text);
|
||||
Assert.NotNull (fv.Border);
|
||||
Assert.Single (fv.InternalSubviews);
|
||||
Assert.Single (fv.Subviews);
|
||||
|
||||
fv = new FrameView ("Test");
|
||||
Assert.Equal ("Test", fv.Title);
|
||||
Assert.Equal (string.Empty, fv.Text);
|
||||
Assert.NotNull (fv.Border);
|
||||
Assert.Single (fv.InternalSubviews);
|
||||
Assert.Single (fv.Subviews);
|
||||
|
||||
fv = new FrameView (new Rect (1, 2, 10, 20), "Test");
|
||||
Assert.Equal ("Test", fv.Title);
|
||||
Assert.Equal (string.Empty, fv.Text);
|
||||
Assert.NotNull (fv.Border);
|
||||
Assert.Single (fv.InternalSubviews);
|
||||
Assert.Single (fv.Subviews);
|
||||
Assert.Equal (new Rect (1, 2, 10, 20), fv.Frame);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user