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
ファイル: WebAssertion.cs プロジェクト: formist/LinkMe
        /// <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
ファイル: NUnitAdapter.cs プロジェクト: jamesshore/NUnitAsp
 /// <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);
     }
 }
コード例 #3
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);
		}
コード例 #4
0
ファイル: ControlTester.cs プロジェクト: vcsjones/NUnitAsp
 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
ファイル: ControlTester.cs プロジェクト: vcsjones/NUnitAsp
 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))
 {
 }