StringAssert Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The string assert.
public class StringAssert
public sealed class StringAssert
public static class StringAssert
type StringAssert = class
Public Class StringAssert
Public NotInheritable Class StringAssert
- Inheritance
-
StringAssert
Constructors
StringAssert() |
Properties
Instance |
Gets the singleton instance of the StringAssert functionality. |
That |
Obsolete.
Gets the singleton instance of the StringAssert functionality. |
Methods
Contains(String, String, String, Object[]) |
Tests whether the specified string contains the specified substring and throws an exception if the substring does not occur within the test string. |
Contains(String, String, String, StringComparison, Object[]) |
Tests whether the specified string contains the specified substring and throws an exception if the substring does not occur within the test string. |
Contains(String, String, String, StringComparison) |
Tests whether the specified string contains the specified substring and throws an exception if the substring does not occur within the test string. |
Contains(String, String, String) |
Tests whether the specified string contains the specified substring and throws an exception if the substring does not occur within the test string. |
Contains(String, String, StringComparison) |
Tests whether the specified string contains the specified substring and throws an exception if the substring does not occur within the test string. |
Contains(String, String) |
Tests whether the specified string contains the specified substring and throws an exception if the substring does not occur within the test string. |
DoesNotMatch(String, Regex, String, Object[]) |
Tests whether the specified string does not match a regular expression and throws an exception if the string matches the expression. |
DoesNotMatch(String, Regex, String) |
Tests whether the specified string does not match a regular expression and throws an exception if the string matches the expression. |
DoesNotMatch(String, Regex) |
Tests whether the specified string does not match a regular expression and throws an exception if the string matches the expression. |
EndsWith(String, String, String, Object[]) |
Tests whether the specified string ends with the specified substring and throws an exception if the test string does not end with the substring. |
EndsWith(String, String, String, StringComparison, Object[]) |
Tests whether the specified string ends with the specified substring and throws an exception if the test string does not end with the substring. |
EndsWith(String, String, String, StringComparison) |
Tests whether the specified string ends with the specified substring and throws an exception if the test string does not end with the substring. |
EndsWith(String, String, String) |
Tests whether the specified string ends with the specified substring and throws an exception if the test string does not end with the substring. |
EndsWith(String, String, StringComparison) |
Tests whether the specified string ends with the specified substring and throws an exception if the test string does not end with the substring. |
EndsWith(String, String) |
Tests whether the specified string ends with the specified substring and throws an exception if the test string does not end with the substring. |
Equals(Object, Object) |
Obsolete.
Static equals overloads are used for comparing instances of two types for equality. This method should not be used for comparison of two instances for equality. Please use StringAssert methods or Assert.AreEqual and associated overloads in your unit tests. |
Matches(String, Regex, String, Object[]) |
Tests whether the specified string matches a regular expression and throws an exception if the string does not match the expression. |
Matches(String, Regex, String) |
Tests whether the specified string matches a regular expression and throws an exception if the string does not match the expression. |
Matches(String, Regex) |
Tests whether the specified string matches a regular expression and throws an exception if the string does not match the expression. |
ReferenceEquals(Object, Object) |
Obsolete.
Static ReferenceEquals overloads are used for comparing instances of two types for reference equality. This method should not be used for comparison of two instances for reference equality. Please use StringAssert methods or Assert.AreSame and associated overloads in your unit tests. |
StartsWith(String, String, String, Object[]) |
Tests whether the specified string begins with the specified substring and throws an exception if the test string does not start with the substring. |
StartsWith(String, String, String, StringComparison, Object[]) |
Tests whether the specified string begins with the specified substring and throws an exception if the test string does not start with the substring. |
StartsWith(String, String, String, StringComparison) |
Tests whether the specified string begins with the specified substring and throws an exception if the test string does not start with the substring. |
StartsWith(String, String, String) |
Tests whether the specified string begins with the specified substring and throws an exception if the test string does not start with the substring. |
StartsWith(String, String, StringComparison) |
Tests whether the specified string begins with the specified substring and throws an exception if the test string does not start with the substring. |
StartsWith(String, String) |
Tests whether the specified string begins with the specified substring and throws an exception if the test string does not start with the substring. |