Exemple #1
0
        public void GenerateInterfaceRegistersScriptBlock()
        {
            MockAspNetService mockAspNet = new MockAspNetService();

            mockAspNet.FindControlResults.Add("DriverPageContentPlaceHolder", new PlaceHolder());

            TestDriverPage page = new TestDriverPage(mockAspNet);

            page.GenerateInterface();

            UnitTestAssert.AreEqual(1, mockAspNet.ClientScriptBlocks.Count);
        }
Exemple #2
0
        public void GenerateInterfaceCreatesPlaceHolder()
        {
            MockAspNetService mockAspNet = new MockAspNetService();
            PlaceHolder       holder     = new PlaceHolder();

            mockAspNet.FindControlResults.Add("DriverPageContentPlaceHolder", holder);

            TestDriverPage page = new TestDriverPage(mockAspNet);

            page.GenerateInterface();

            UnitTestAssert.AreSame(holder, page.ContentPlaceHolder);
        }
Exemple #3
0
        public void GenerateInterfaceCreatesCommandsArea()
        {
            MockAspNetService mockAspNet = new MockAspNetService();

            mockAspNet.FindControlResults.Add("DriverPageContentPlaceHolder", new PlaceHolder());

            TestDriverPage page = new TestDriverPage(mockAspNet);

            page.GenerateInterface();

            Panel control = (Panel)page.ContentPlaceHolder.Controls[2].Controls[2];

            UnitTestAssert.AreEqual("TraceConsole", control.ID);
        }
Exemple #4
0
        public void GenerateInterfaceCreatesTreeView()
        {
            MockAspNetService mockAspNet = new MockAspNetService();

            mockAspNet.FindControlResults.Add("DriverPageContentPlaceHolder", new PlaceHolder());

            TestDriverPage page = new TestDriverPage(mockAspNet);

            page.GenerateInterface();

            TreeView control = (TreeView)page.ContentPlaceHolder.Controls[1].Controls[0];

            UnitTestAssert.AreEqual("testcasesTreeView", control.ID);
        }
Exemple #5
0
        public void GenerateInterfaceCreatesThreadLabel()
        {
            MockAspNetService mockAspNet = new MockAspNetService();

            mockAspNet.FindControlResults.Add("DriverPageContentPlaceHolder", new PlaceHolder());

            TestDriverPage page = new TestDriverPage(mockAspNet);

            page.GenerateInterface();

            Label control = (Label)page.ContentPlaceHolder.Controls[0].Controls[1].Controls[6].Controls[5];

            UnitTestAssert.AreEqual("ThreadId", control.ID);
        }
Exemple #6
0
        public void GenerateInterfaceCreatesRunFailedTestsButton()
        {
            MockAspNetService mockAspNet = new MockAspNetService();

            mockAspNet.FindControlResults.Add("DriverPageContentPlaceHolder", new PlaceHolder());

            TestDriverPage page = new TestDriverPage(mockAspNet);

            page.GenerateInterface();

            Button control = (Button)page.ContentPlaceHolder.Controls[0].Controls[1].Controls[6].Controls[1];

            UnitTestAssert.AreEqual("failedTests", control.ID);
        }
Exemple #7
0
        public void GenerateInterfaceCreatesShowConsoleCheckbox()
        {
            MockAspNetService mockAspNet = new MockAspNetService();

            mockAspNet.FindControlResults.Add("DriverPageContentPlaceHolder", new PlaceHolder());

            TestDriverPage page = new TestDriverPage(mockAspNet);

            page.GenerateInterface();

            CheckBox control = (CheckBox)page.ContentPlaceHolder.Controls[0].Controls[1].Controls[2];

            UnitTestAssert.AreEqual("ShowConsoleCheckBox", control.ID);
        }
Exemple #8
0
        public void GenerateInterfaceCreatesHelpIcon()
        {
            MockAspNetService mockAspNet = new MockAspNetService();

            mockAspNet.FindControlResults.Add("DriverPageContentPlaceHolder", new PlaceHolder());

            TestDriverPage page = new TestDriverPage(mockAspNet);

            page.GenerateInterface();

            Image control = (Image)page.ContentPlaceHolder.Controls[0].Controls[0].Controls[1];

            UnitTestAssert.AreEqual("help", control.ID);
        }
Exemple #9
0
        public void GenerateInterfaceCreatesTestsDiv()
        {
            MockAspNetService mockAspNet = new MockAspNetService();

            mockAspNet.FindControlResults.Add("DriverPageContentPlaceHolder", new PlaceHolder());

            TestDriverPage page = new TestDriverPage(mockAspNet);

            page.GenerateInterface();

            Panel control = (Panel)page.ContentPlaceHolder.Controls[1];

            UnitTestAssert.AreEqual("Tests", control.ID);
            UnitTestAssert.AreEqual("tests", control.CssClass);
        }
Exemple #10
0
        public void GenerateInterfaceCreatesSpinnerImage()
        {
            MockAspNetService mockAspNet = new MockAspNetService();

            mockAspNet.FindControlResults.Add("DriverPageContentPlaceHolder", new PlaceHolder());

            TestDriverPage page = new TestDriverPage(mockAspNet);

            page.GenerateInterface();

            //headerDiv.MenuPanel.ButtonPanel
            HtmlImage control = (HtmlImage)page.ContentPlaceHolder.Controls[0].Controls[1].Controls[6].Controls[3];

            UnitTestAssert.AreEqual("spinner", control.ID);
        }