C# Class NUnit.Extensions.Asp.WebAssert

Assertions specific to NUnitAsp's web testers.
Datei anzeigen Open project: vcsjones/NUnitAsp Class Usage Examples

Public Methods

Method Description
AreEqual ( string expected, string actual ) : void

Asserts that two "rows" of strings are identical.

AreEqual ( string expected, string actual, string message ) : void

Asserts that two "rows" of strings are identical.

CurrentUrlEndsWith ( HttpClient browser, string expectedEndOfUrl ) : void

Asserts that the specified browser's current URL ends with a specific string. Start your expectedEndOfUrl with a '/' for maximum accuracy.

CurrentUrlEndsWith ( string expectedEndOfUrl ) : void

Asserts that the default browser's current URL ends with a specific string. Start your expectedEndOfUrl with a '/' for maximum accuracy.

NotVisible ( Tester tester ) : void

Asserts that a specific control is not on the current web page, or if it is, its "Visible" parameter is set to "false." This method does not distinguish between non-existant controls and non-visible controls: use with caution.

NotVisible ( Tester tester, string message ) : void

Asserts that a specific control is not 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.

Visible ( Tester tester ) : void

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.

Visible ( Tester tester, string message ) : void

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.

Private Methods

Method Description
AreEqual ( object expected, object actual, string message ) : void
AreEqualIgnoringOrder ( string expected, string actual ) : void
AreEqualIgnoringOrder ( string expected, string actual, string message ) : void
ArraysEqual ( string expected, string actual ) : bool
AssertTableContainsRow ( string message, string expected, string actual, string actualRow ) : void
Compare ( string a, string b, DataType type ) : int
Fail ( string message ) : void
Fail ( string message, string expected, string actual ) : void
Flatten ( string a ) : string
NotNull ( object o, string message ) : void
RenderArray ( string array ) : string
RenderDoubleArray ( string doubleArray ) : string
Sorted ( string data, int column, bool isAscending, DataType type ) : void
Sorted ( string data, int column, bool isAscending, DataType type, string message ) : void
TableContainsRow ( string table ) : void
True ( bool condition, string message ) : void
Visibility ( Tester tester, bool expectedVisibility ) : void
Visibility ( Tester tester, bool expectedVisibility, string message ) : void

Method Details

AreEqual() public static method

Asserts that two "rows" of strings are identical.
public static AreEqual ( string expected, string actual ) : void
expected string
actual string
return void

AreEqual() public static method

Asserts that two "rows" of strings are identical.
public static AreEqual ( string expected, string actual, string message ) : void
expected string
actual string
message string
return void

CurrentUrlEndsWith() public static method

Asserts that the specified browser's current URL ends with a specific string. Start your expectedEndOfUrl with a '/' for maximum accuracy.
public static CurrentUrlEndsWith ( HttpClient browser, string expectedEndOfUrl ) : void
browser HttpClient The browser to check.
expectedEndOfUrl string What you expect the URL to end with.
return void

CurrentUrlEndsWith() public static method

Asserts that the default browser's current URL ends with a specific string. Start your expectedEndOfUrl with a '/' for maximum accuracy.
public static CurrentUrlEndsWith ( string expectedEndOfUrl ) : void
expectedEndOfUrl string What you expect the URL to end with.
return void

NotVisible() public static method

Asserts that a specific control is not on the current web page, or if it is, its "Visible" parameter is set to "false." This method does not distinguish between non-existant controls and non-visible controls: use with caution.
public static NotVisible ( Tester tester ) : void
tester Tester The tester for the control to check.
return void

NotVisible() public static method

Asserts that a specific control is not 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.
public static NotVisible ( Tester tester, string message ) : void
tester Tester The tester for the control to check.
message string The error message to display if the assertion fails.
return void

Visible() public static method

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.
public static Visible ( Tester tester ) : void
tester Tester The tester for the control to check.
return void

Visible() public static method

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.
public static Visible ( Tester tester, string message ) : void
tester Tester The tester for the control to check.
message string The error message to display if the assertion fails.
return void