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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }