Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVsevolod Kukol <sevo@sevo.org>2015-01-26 00:28:38 +0300
committerVsevolod Kukol <sevo@sevo.org>2015-01-26 00:28:38 +0300
commitbb8f69d9828d2473144b45625c9234ea416303bf (patch)
tree20f86d73309cd2a671829b2a982639a98e369164
parent962c35a6b20ebc572cc025c69ec462e91605d095 (diff)
parent0f6c6b9f59950b57e096fbdf453790ff6604a4bf (diff)
Merge pull request #453 from DavidKarlas/master
[Test] Added tests for window initial location and size
-rw-r--r--Testing/Tests/WindowTests.cs38
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