示例#1
0
        public void OnLoadComplete_HidesConsoleIfCheckboxIsNotSet()
        {
            MockAspNetService mockAspNet = new MockAspNetService();

            mockAspNet.SetIsPostBack(true);

            TestDriverPage page = new TestDriverPage(mockAspNet);

            page.ShowConsoleCheckBox         = new CheckBox();
            page.ShowConsoleCheckBox.Checked = false;

            page.TestsPanel  = new Panel();
            page.FooterPanel = new Panel();

            page.OnLoadCompleteInternal();
            UnitTestAssert.AreEqual("testsNoConsole", page.TestsPanel.CssClass);
            UnitTestAssert.IsFalse(page.FooterPanel.Visible);
        }
示例#2
0
        public void OnLoadComplete_ShowConsoleFromQueryString()
        {
            MockAspNetService mockAspNet = new MockAspNetService();

            mockAspNet.SetIsPostBack(false);
            NameValueCollection col = new NameValueCollection();

            col.Add("console", "false");
            mockAspNet.SetQueryString(col);

            TestDriverPage page = new TestDriverPage(mockAspNet);

            page.WriteLogToDiskCheckBox = new CheckBox();
            page.ShowConsoleCheckBox    = new CheckBox();
            page.FooterPanel            = new Panel();
            page.TestsPanel             = new Panel();
            page.OnLoadCompleteInternal();

            UnitTestAssert.AreEqual("testsNoConsole", page.TestsPanel.CssClass);
            UnitTestAssert.IsFalse(page.FooterPanel.Visible);
        }