public void IsNotSmartNavigation() { Page pg = new Page(); pg.SmartNavigation = false; WebAssert.IsNotSmartNavigation(pg); }
/** * Creates a new instance. * @param name the plugin name * @param description the plugin description * @param filename the plugin filename */ public PluginConfiguration(String name, String description, String filename) { WebAssert.notNull("name", name); name_ = name; description_ = description; filename_ = filename; }
public void AreTemplateSourceDirectoryEqual() { TextBox txtBoxControl = new TextBox(); CheckBox chkBoxControl = new CheckBox(); WebAssert.AreTemplateSourceDirectoryEqual(txtBoxControl, chkBoxControl); }
public void IsNotEnableViewState() { TextBox txtBoxControl = new TextBox(); txtBoxControl.EnableViewState = false; WebAssert.IsNotEnableViewState(txtBoxControl); }
/// <summary> /// <summary> /// Creates a new instance. /// </summary> /// <param name="type">the mime type</param> /// <param name="description">the type description</param> /// <param name="suffixes">the file suffixes</param> public MimeType(String type, String description, String suffixes) { WebAssert.notNull("type", type); type_ = type; description_ = description; suffixes_ = suffixes; }
public void TestXPath() { string test = "<html><myTag foo='bar' /></html>"; HtmlTagTester tag = HtmlTagTester.TestInstance(test, "//*[@foo='bar']"); WebAssert.Visible(tag); }
public void IsNotVisible() { TextBox txtBoxControl = new TextBox(); txtBoxControl.Visible = false; WebAssert.IsNotVisible(txtBoxControl); }
public void IsSmartNavigation() { Page pg = new Page(); pg.SmartNavigation = true; WebAssert.IsSmartNavigation(pg); }
public void TestNoMessages() { textBox1.Text = "hi"; textBox2.Text = "bye"; textBox3.Text = "fly"; button.Click(); WebAssert.NotVisible(bulletedSummary); WebAssert.NotVisible(listSummary); try { string[] ignored = bulletedSummary.Messages; Fail("expected exception"); } catch (WebAssertionException) { } try { string[] ignored = listSummary.Messages; Fail("expected exception"); } catch (WebAssertionException) { } }
public void IsNotChild() { PlaceHolder place = new PlaceHolder(); TextBox txtBoxControl = new TextBox(); WebAssert.IsNotChild(place, txtBoxControl); }
public void IsIDEqual() { TextBox txtBoxControl = new TextBox(); txtBoxControl.ID = "TxtBoxControl"; WebAssert.IsIDEqual(txtBoxControl, "TxtBoxControl"); }
public void IsVisible() { TextBox txtBoxControl = new TextBox(); txtBoxControl.Visible = true; WebAssert.IsVisible(txtBoxControl); }
public void IsNotValid() { Page pg = new Page(); pg.Validate(); WebAssert.IsNotValid(pg); }
public void AreErrorPageEqual() { Page pg = new Page(); pg.ErrorPage = "404.html"; WebAssert.AreErrorPageEqual("404.html", pg); }
public static void Init() { DriverFactory = new WebDriverFactory(); Asserter = new WebAssert(); Timeouts = new WebTimeoutSettings(); Logger = new NUnitLogger(); MapInterfaceToElement.Init(DefaultInterfacesMap); }
public void MalformedTables() { string[][] expected = new string[][] { new string[] {} }; WebAssert.AreEqual(expected, malformedTable.Cells, "malformed table"); }
public void TestTableContainsRow() { string[][] testData = new string[][] { new string[] { "a", "b" }, }; WebAssert.TableContainsRow(testData, "a", "b"); }
public void AreClientTargetEqual() { Page pg = new Page(); pg.ClientTarget = "BrowserDetect.html"; WebAssert.AreClientTargetEqual("BrowserDetect.html", pg); }
public void TestSorted_WhenNumber() { string[][] testData = new string[][] { new string[] { "9" }, new string[] { "10" }, }; WebAssert.Sorted(testData, 0, true, DataType.Int); }
public void TestNoValueAttribute() { HtmlInputRadioButtonTester button2A = new HtmlInputRadioButtonTester("button2A"); button2A.Checked = true; postback.Click(); WebAssert.TableContainsRow(formVars.RenderedCells, new string[] { "group2", "on" }); }
public void HasControls() { PlaceHolder place = new PlaceHolder(); TextBox txtBoxControl = new TextBox(); place.Controls.Add(txtBoxControl); WebAssert.HasControls(place); }
public void TestSorted_WhenDate() { string[][] testData = new string[][] { new string[] { "7/4/2002" }, new string[] { "7/16/2002" }, }; WebAssert.Sorted(testData, 0, true, DataType.DateTime); }
public void TableHeaderTags() { string[][] expected = new string[][] { new string[] { "header 1", "data 1", "header 2", "data 2" } }; WebAssert.AreEqual(expected, headerTags.Cells, "header tags table"); WebAssert.AreEqual(expected, headerTags.RenderedCells, "header tags table (rendered)"); }
public void TestRenderedCells() { string[][] expected = new string[][] { new string[] { "Link", "Cell 1, 1", "Cell 1, 2", "Space: ", "1" }, new string[] { "Link", "Cell 2, 1", "Cell 2, 2", "Space: ", "2" } }; WebAssert.AreEqual(expected, grid1.RenderedCells); }
public void TestCells() { string[][] expected = new string[][] { new string[] { "<a id=\"dataGrid1_ctl02_link1\" href=\"javascript:__doPostBack('dataGrid1$ctl02$link1','')\">Link</a>", "Cell 1, 1", "Cell 1, 2", "Space: ", "1" }, new string[] { "<a id=\"dataGrid1_ctl03_link1\" href=\"javascript:__doPostBack('dataGrid1$ctl03$link1','')\">Link</a>", "Cell 2, 1", "Cell 2, 2", "Space: ", "2" } }; WebAssert.AreEqual(expected, grid1.Cells); }
public void IsChild() { PlaceHolder place = new PlaceHolder(); TextBox txtBoxControl = new TextBox(); txtBoxControl.ID = "TxtBoxControl"; place.Controls.Add(txtBoxControl); WebAssert.IsChild(place, "TxtBoxControl"); }
public void TestSorted_WhenSortedDescendingAndEndingWithEmptyString() { string[][] testData = new string[][] { new string[] { "4" }, new string[] { "3" }, new string[] { "2" }, new string[] { "" }, }; WebAssert.Sorted(testData, 0, false, DataType.String); }
public void TestSorted_WhenSorted() { string[][] testData = new string[][] { new string[] { "1" }, new string[] { "2" }, new string[] { "3" }, new string[] { "4" } }; WebAssert.Sorted(testData, 0, true, DataType.String); }
/// <summary> /// For backwards compatibility; will be deprecated in the future. /// </summary> public static void AssertVisibility(ControlTester tester, bool expectedVisibility) { if (expectedVisibility) { WebAssert.Visible(tester); } else { WebAssert.NotVisible(tester); } }
public void TestSorted_WhenSortingOnLastColumn() { string[][] testData = new string[][] { new string[] { "1", "4" }, new string[] { "3", "3" }, new string[] { "2", "2" }, new string[] { "4", "1" }, }; WebAssert.Sorted(testData, 1, false, DataType.String); }