diff options
author | Vsevolod Kukol <sevo@sevo.org> | 2015-01-26 00:28:38 +0300 |
---|---|---|
committer | Vsevolod Kukol <sevo@sevo.org> | 2015-01-26 00:28:38 +0300 |
commit | bb8f69d9828d2473144b45625c9234ea416303bf (patch) | |
tree | 20f86d73309cd2a671829b2a982639a98e369164 | |
parent | 962c35a6b20ebc572cc025c69ec462e91605d095 (diff) | |
parent | 0f6c6b9f59950b57e096fbdf453790ff6604a4bf (diff) |
Merge pull request #453 from DavidKarlas/master
[Test] Added tests for window initial location and size
-rw-r--r-- | Testing/Tests/WindowTests.cs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Testing/Tests/WindowTests.cs b/Testing/Tests/WindowTests.cs index 0ce7182e..1516c8db 100644 --- a/Testing/Tests/WindowTests.cs +++ b/Testing/Tests/WindowTests.cs @@ -218,6 +218,44 @@ namespace Xwt } Assert.IsFalse (closed, "Window should not be closed"); } + + [Test] + public void InitialLocationManualWithoutContent () + { + using (var win = new Window ()) { + win.InitialLocation = WindowLocation.Manual; + win.Location = new Point (210, 230); + win.Size = new Size (100, 100); + ShowWindow (win); + Assert.AreEqual (210, win.X); + Assert.AreEqual (230, win.Y); + } + } + + [Test] + public void InitialLocationManualWithoutContentAndSize () + { + using (var win = new Window ()) { + win.InitialLocation = WindowLocation.Manual; + win.Location = new Point (210, 230); + ShowWindow (win); + Assert.AreEqual (210, win.X); + Assert.AreEqual (230, win.Y); + } + } + + [Test] + public void InitialLocationManual () + { + using (var win = new Window ()) { + win.InitialLocation = WindowLocation.Manual; + win.Content = new Label ("Hi there!"); + win.Location = new Point (210, 230); + ShowWindow (win); + Assert.AreEqual (210, win.X); + Assert.AreEqual (230, win.Y); + } + } } public class SquareBox: Canvas |