public void VerifyNewScreenSizeIsSet() { var newScreenHeight = 1; var newScreenWidth = 2; var screenSizeProvider = new DefaultScreenSizeProvider(); screenSizeProvider.UpdateDisplayInformation(newScreenHeight, newScreenWidth).Wait(); Assert.AreEqual(screenSizeProvider.Height, newScreenHeight); Assert.AreEqual(screenSizeProvider.Width, newScreenWidth); }
public void VerifyScreenSizeChangedEventIsRaised() { var screenSizeChanged = false; var screenSizeProvider = new DefaultScreenSizeProvider(); screenSizeProvider.ScreenSizeChanged += (sender, args) => { screenSizeChanged = true; }; screenSizeProvider.UpdateDisplayInformation(1, 1).Wait(); Assert.IsTrue(screenSizeChanged); }