Base class for all tag-based controls. Most people should extend AspTester.AspControlTester or HtmlTester.HtmlControlTester. The API for this class will change in future releases.
Inheritance: Tester
示例#1
0
        /// <summary>
        /// Asserts that a specific control is on the current web page, with the "Visible"
        /// parameter set to "true."  This method does not assert that the control is actually
        /// visible to the user.
        /// </summary>
        public static void AssertVisibility(ControlTester tester, bool expectedVisibility)
        {
            string not     = expectedVisibility ? "" : " not";
            string message = String.Format("{0} control should{1} be visible (HTML ID: {2}; ASP location: {3})", tester.AspId, not, tester.HtmlId, tester.Description);

            Assert(message, tester.Visible == expectedVisibility);
        }
示例#2
0
 /// <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);
     }
 }
		/// <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);
		}
示例#4
0
 private static string GetMessage(ControlTester control)
 {
     return string.Format(
         "Control {0} (HTML ID: {1}; ASP location: {2}) is disabled",
         control.AspId, control.HtmlId, control.Description);
 }
示例#5
0
 public ControlDisabledException(ControlTester control)
     : base(GetMessage(control))
 {
 }
示例#6
0
 private static string GetMessage(ControlTester control)
 {
     return(string.Format(
                "Control {0} (HTML ID: {1}; ASP location: {2}) is disabled",
                control.AspId, control.HtmlId, control.Description));
 }
示例#7
0
 public ControlDisabledException(ControlTester control) :
     base(GetMessage(control))
 {
 }