|
|
|
@ -101,6 +101,7 @@ namespace Avalonia.Controls.UnitTests |
|
|
|
var windowImpl = new Mock<IWindowImpl>(); |
|
|
|
windowImpl.SetupProperty(x => x.Closed); |
|
|
|
windowImpl.Setup(x => x.DesktopScaling).Returns(1); |
|
|
|
windowImpl.Setup(x => x.RenderScaling).Returns(1); |
|
|
|
|
|
|
|
var services = TestServices.StyledWindow.With( |
|
|
|
windowingPlatform: new MockWindowingPlatform(() => windowImpl.Object)); |
|
|
|
@ -207,6 +208,7 @@ namespace Avalonia.Controls.UnitTests |
|
|
|
var windowImpl = new Mock<IWindowImpl>(); |
|
|
|
windowImpl.SetupProperty(x => x.Closed); |
|
|
|
windowImpl.Setup(x => x.DesktopScaling).Returns(1); |
|
|
|
windowImpl.Setup(x => x.RenderScaling).Returns(1); |
|
|
|
|
|
|
|
var target = new Window(windowImpl.Object); |
|
|
|
var task = target.ShowDialog<bool>(parent.Object); |
|
|
|
@ -246,6 +248,7 @@ namespace Avalonia.Controls.UnitTests |
|
|
|
var windowImpl = new Mock<IWindowImpl>(); |
|
|
|
windowImpl.SetupProperty(x => x.Closed); |
|
|
|
windowImpl.Setup(x => x.DesktopScaling).Returns(1); |
|
|
|
windowImpl.Setup(x => x.RenderScaling).Returns(1); |
|
|
|
|
|
|
|
var target = new Window(windowImpl.Object); |
|
|
|
var task = target.ShowDialog<bool>(parent.Object); |
|
|
|
@ -274,6 +277,7 @@ namespace Avalonia.Controls.UnitTests |
|
|
|
var windowImpl = MockWindowingPlatform.CreateWindowMock(); |
|
|
|
windowImpl.Setup(x => x.ClientSize).Returns(new Size(800, 480)); |
|
|
|
windowImpl.Setup(x => x.DesktopScaling).Returns(1); |
|
|
|
windowImpl.Setup(x => x.RenderScaling).Returns(1); |
|
|
|
windowImpl.Setup(x => x.Screen).Returns(screens.Object); |
|
|
|
|
|
|
|
using (UnitTestApplication.Start(TestServices.StyledWindow)) |
|
|
|
@ -299,11 +303,13 @@ namespace Avalonia.Controls.UnitTests |
|
|
|
parentWindowImpl.Setup(x => x.ClientSize).Returns(new Size(800, 480)); |
|
|
|
parentWindowImpl.Setup(x => x.MaxAutoSizeHint).Returns(new Size(1920, 1080)); |
|
|
|
parentWindowImpl.Setup(x => x.DesktopScaling).Returns(1); |
|
|
|
parentWindowImpl.Setup(x => x.RenderScaling).Returns(1); |
|
|
|
|
|
|
|
var windowImpl = MockWindowingPlatform.CreateWindowMock(); |
|
|
|
windowImpl.Setup(x => x.ClientSize).Returns(new Size(320, 200)); |
|
|
|
windowImpl.Setup(x => x.MaxAutoSizeHint).Returns(new Size(1920, 1080)); |
|
|
|
windowImpl.Setup(x => x.DesktopScaling).Returns(1); |
|
|
|
windowImpl.Setup(x => x.RenderScaling).Returns(1); |
|
|
|
|
|
|
|
var parentWindowServices = TestServices.StyledWindow.With( |
|
|
|
windowingPlatform: new MockWindowingPlatform(() => parentWindowImpl.Object)); |
|
|
|
|