Example #1
0
        public FormsWindow()
        {
            form = new Form
            {
                Text            = StackTraceExtensions.GetEntryName(),
                Size            = new Size(800, 600),
                FormBorderStyle = FormBorderStyle.Sizable,
                StartPosition   = FormStartPosition.CenterScreen
            };
            Icon appIcon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);

            if (appIcon != null)
            {
                form.Icon = appIcon;
            }
            form.SizeChanged += OnSizeChanged;
            form.Show();
            closeAfterOneFrameIfInIntegrationTest = !StackTraceExtensions.ContainsNoTestOrIsVisualTest();
        }
        public void ContainsNoTestOrIsVisualTest()
        {
            var isThisAVisualTest = StackTraceExtensions.ContainsNoTestOrIsVisualTest();

            Assert.IsFalse(isThisAVisualTest);
        }