Language

MoreAsserts.AssertNotContainsRegex Method

Definition

Overloads

Name Description
AssertNotContainsRegex(String, String)

Variant of #assertNotContainsRegex(String,String,String) using a generic message.

AssertNotContainsRegex(String, String, String)

Asserts that expectedRegex does not match any substring of actual, and fails with message if it does.

AssertNotContainsRegex(String, String)

Variant of #assertNotContainsRegex(String,String,String) using a generic message.

[Android.Runtime.Register("assertNotContainsRegex", "(Ljava/lang/String;Ljava/lang/String;)V", "")]
public static void AssertNotContainsRegex(string? expectedRegex, string? actual);
[<Android.Runtime.Register("assertNotContainsRegex", "(Ljava/lang/String;Ljava/lang/String;)V", "")>]
static member AssertNotContainsRegex : string * string -> unit

Parameters

expectedRegex
String

The Java regular expression that must not match any substring of actual.

actual
String

The non-null string to search.

Attributes

Remarks

Variant of #assertNotContainsRegex(String,String,String) using a generic message.

Java documentation for android.test.MoreAsserts.assertNotContainsRegex(java.lang.String, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

AssertNotContainsRegex(String, String, String)

Asserts that expectedRegex does not match any substring of actual, and fails with message if it does.

[Android.Runtime.Register("assertNotContainsRegex", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", "")]
public static void AssertNotContainsRegex(string? message, string? expectedRegex, string? actual);
[<Android.Runtime.Register("assertNotContainsRegex", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", "")>]
static member AssertNotContainsRegex : string * string * string -> unit

Parameters

message
String

The message to include if the assertion fails, or null for the default message.

expectedRegex
String

The Java regular expression that must not match any substring of actual.

actual
String

The non-null string to search.

Attributes

Remarks

Asserts that expectedRegex does not match any substring of actual, and fails with message if it does. Note that you can also use this for a literal string, by wrapping your expected string in Pattern#quote.

Java documentation for android.test.MoreAsserts.assertNotContainsRegex(java.lang.String, java.lang.String, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to