Пример #1
0
        public void TestResolutionChange()
        {
            DisplayScreen screen = new DisplayScreen();

            if (screen.ScreenWidth == 800)
            {
                screen.ScreenWidth  = 1024;
                screen.ScreenHeight = 768;
                screen.UpdateSettingsToFullscreen();

                DisplayScreen tmp = new DisplayScreen();
                Assert.IsTrue((tmp.ScreenWidth == screen.ScreenWidth) &&
                              (tmp.ScreenHeight == screen.ScreenHeight));

                DisplayScreen.ResetSettings();
            }
            else
            {
                screen.ScreenWidth  = 800;
                screen.ScreenHeight = 600;
                screen.UpdateSettingsToFullscreen();

                DisplayScreen tmp = new DisplayScreen();
                Assert.IsTrue((tmp.ScreenWidth == screen.ScreenWidth) &&
                              (tmp.ScreenHeight == screen.ScreenHeight));

                DisplayScreen.ResetSettings();
            }
        }