PexAssert.AreNotEqual Method
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.
Overloads
AreNotEqual(String, String, Boolean, String) |
Asserts that two strings are not equal, with a specified message in the exception object. |
AreNotEqual(String, String, Boolean, CultureInfo, String, Object[]) |
Asserts that a culture-specific comparison of two strings is false, with a specified message in the exception object. |
AreNotEqual(String, String, Boolean, String, Object[]) |
Asserts that two strings are not equal, with a specified message in the exception object. |
AreNotEqual(String, String, Boolean, CultureInfo, String) |
Asserts that a culture-specific comparison of two strings is false, with a specified message in the exception object. |
AreNotEqual(Single, Single, Single, String, Object[]) |
Asserts that two |
AreNotEqual(Double, Double, Double, String, Object[]) |
Asserts that two |
AreNotEqual(String, String, Boolean, CultureInfo) |
Asserts that a culture-specific comparison of two strings is false. |
AreNotEqual(Single, Single, Single, String) |
Asserts that two |
AreNotEqual(Object, Object, String, Object[]) |
Asserts that two object instances are not equal, with a specified message in the exception object. |
AreNotEqual(Double, Double, Double, String) |
Asserts that two |
AreNotEqual(String, String, Boolean) |
Asserts that two strings are not equal. |
AreNotEqual(Single, Single, Single) |
Asserts that two |
AreNotEqual(Object, Object, String) |
Asserts that two object instances are not equal, with a specified message in the exception object. |
AreNotEqual(Double, Double, Double) |
Asserts that two |
AreNotEqual(Object, Object) |
Asserts that two object instances are not equal. |
AreNotEqual<T>(T, T) |
Asserts that two object instances with a specified type are not equal. |
AreNotEqual<T>(T, T, PexEqualityComparison<T>) |
Asserts that two object instances with a specified type are not equal,
based on an |
AreNotEqual<T>(T, T, String) |
Asserts that two object instances with a specified type are not equal, with a specified message in the exception object. |
AreNotEqual<T>(T, T, String, Object[]) |
Asserts that two object instances with a specified type are not equal, with a specified message in the exception object. |
AreNotEqual(String, String, Boolean, String)
Asserts that two strings are not equal, with a specified message in the exception object.
public:
static void AreNotEqual(System::String ^ expected, System::String ^ actual, bool ignoreCase, System::String ^ message);
public static void AreNotEqual (string expected, string actual, bool ignoreCase, string message);
static member AreNotEqual : string * string * bool * string -> unit
Public Shared Sub AreNotEqual (expected As String, actual As String, ignoreCase As Boolean, message As String)
Parameters
- expected
- String
The expected string.
- actual
- String
The actual string.
- ignoreCase
- Boolean
Set this value to true
for case-sensitive comparison
and false otherwise.
- message
- String
The message string.
Exceptions
If the strings are equal.
Applies to
AreNotEqual(String, String, Boolean, CultureInfo, String, Object[])
Asserts that a culture-specific comparison of two strings is false, with a specified message in the exception object.
public:
static void AreNotEqual(System::String ^ expected, System::String ^ actual, bool ignoreCase, System::Globalization::CultureInfo ^ culture, System::String ^ format, ... cli::array <System::Object ^> ^ args);
public static void AreNotEqual (string expected, string actual, bool ignoreCase, System.Globalization.CultureInfo culture, string format, params object[] args);
static member AreNotEqual : string * string * bool * System.Globalization.CultureInfo * string * obj[] -> unit
Public Shared Sub AreNotEqual (expected As String, actual As String, ignoreCase As Boolean, culture As CultureInfo, format As String, ParamArray args As Object())
Parameters
- expected
- String
The expected string.
- actual
- String
The actual string.
- ignoreCase
- Boolean
Set this value to true
for case-sensitive comparison
and false otherwise.
- culture
- CultureInfo
A System.Globalization.CultureInfo
object that contains the
culture-specific comparison information.
- format
- String
A message format string. The syntax for this string is identical to the format string
used by Console.Writeline
. In particular, insert "{0}", "{1}" and so on at appropriate
locations in the string to represent the values of the variables in the args
array.
- args
- Object[]
One or more variables. whose values are to be inserted in format
.
Exceptions
If the strings are equal.
Remarks
For more information, see System.String.Compare
.
Applies to
AreNotEqual(String, String, Boolean, String, Object[])
Asserts that two strings are not equal, with a specified message in the exception object.
public:
static void AreNotEqual(System::String ^ expected, System::String ^ actual, bool ignoreCase, System::String ^ format, ... cli::array <System::Object ^> ^ args);
public static void AreNotEqual (string expected, string actual, bool ignoreCase, string format, params object[] args);
static member AreNotEqual : string * string * bool * string * obj[] -> unit
Public Shared Sub AreNotEqual (expected As String, actual As String, ignoreCase As Boolean, format As String, ParamArray args As Object())
Parameters
- expected
- String
The expected string.
- actual
- String
The actual string.
- ignoreCase
- Boolean
Set this value to true
for case-sensitive comparison
and false otherwise.
- format
- String
A message format string. The syntax for this string is identical to the format string
used by Console.Writeline
. In particular, insert "{0}", "{1}" and so on at appropriate
locations in the string to represent the values of the variables in the args
array.
- args
- Object[]
One or more variables. whose values are to be inserted in format
.
Exceptions
If the strings are equal.
Applies to
AreNotEqual(String, String, Boolean, CultureInfo, String)
Asserts that a culture-specific comparison of two strings is false, with a specified message in the exception object.
public:
static void AreNotEqual(System::String ^ expected, System::String ^ actual, bool ignoreCase, System::Globalization::CultureInfo ^ culture, System::String ^ message);
public static void AreNotEqual (string expected, string actual, bool ignoreCase, System.Globalization.CultureInfo culture, string message);
static member AreNotEqual : string * string * bool * System.Globalization.CultureInfo * string -> unit
Public Shared Sub AreNotEqual (expected As String, actual As String, ignoreCase As Boolean, culture As CultureInfo, message As String)
Parameters
- expected
- String
The expected string.
- actual
- String
The actual string.
- ignoreCase
- Boolean
Set this value to true
for case-sensitive comparison
and false otherwise.
- culture
- CultureInfo
A System.Globalization.CultureInfo
object that contains the
culture-specific comparison information.
- message
- String
The message string.
Exceptions
If the strings are equal.
Remarks
For more information, see System.String.Compare
.
Applies to
AreNotEqual(Single, Single, Single, String, Object[])
Asserts that two float
values are not equal within a specified precision, with a specified
message in the exception object.
public:
static void AreNotEqual(float expected, float actual, float delta, System::String ^ format, ... cli::array <System::Object ^> ^ args);
public static void AreNotEqual (float expected, float actual, float delta, string format, params object[] args);
static member AreNotEqual : single * single * single * string * obj[] -> unit
Public Shared Sub AreNotEqual (expected As Single, actual As Single, delta As Single, format As String, ParamArray args As Object())
Parameters
- expected
- Single
The expected value.
- actual
- Single
The value to be tested.
- delta
- Single
The test's precision. This value must be positive.
- format
- String
A message format string. The syntax for this string is identical to the format string
used by Console.Writeline
. In particular, insert "{0}", "{1}" and so on at appropriate
locations in the string to represent the values of the variables in the args
array.
- args
- Object[]
One or more variables. whose values are to be inserted in format
.
Exceptions
If the expected and actual values are equal.
If delta is negative.
Remarks
The assertion fails if the absolute value of the difference between the expected and actual values is less than or equal to delta.
Applies to
AreNotEqual(Double, Double, Double, String, Object[])
Asserts that two double
values are not equal within a specified precision, with a specified
message in the exception object.
public:
static void AreNotEqual(double expected, double actual, double delta, System::String ^ format, ... cli::array <System::Object ^> ^ args);
public static void AreNotEqual (double expected, double actual, double delta, string format, params object[] args);
static member AreNotEqual : double * double * double * string * obj[] -> unit
Public Shared Sub AreNotEqual (expected As Double, actual As Double, delta As Double, format As String, ParamArray args As Object())
Parameters
- expected
- Double
The expected value.
- actual
- Double
The value to be tested.
- delta
- Double
The test's precision. This value must be positive.
- format
- String
A message format string. The syntax for this string is identical to the format string
used by Console.Writeline
. In particular, insert "{0}", "{1}" and so on at appropriate
locations in the string to represent the values of the variables in the args
array.
- args
- Object[]
One or more variables. whose values are to be inserted in format
.
Exceptions
If the expected and actual values are equal.
If delta is negative.
Remarks
The assertion fails if the absolute value of the difference between the expected and actual values is less than or equal to delta.
Applies to
AreNotEqual(String, String, Boolean, CultureInfo)
Asserts that a culture-specific comparison of two strings is false.
public:
static void AreNotEqual(System::String ^ expected, System::String ^ actual, bool ignoreCase, System::Globalization::CultureInfo ^ culture);
public static void AreNotEqual (string expected, string actual, bool ignoreCase, System.Globalization.CultureInfo culture);
static member AreNotEqual : string * string * bool * System.Globalization.CultureInfo -> unit
Public Shared Sub AreNotEqual (expected As String, actual As String, ignoreCase As Boolean, culture As CultureInfo)
Parameters
- expected
- String
The expected string.
- actual
- String
The actual string.
- ignoreCase
- Boolean
Set this value to true
for case-sensitive comparison
and false otherwise.
- culture
- CultureInfo
A System.Globalization.CultureInfo
object that contains the
culture-specific comparison information.
Exceptions
If the strings are equal.
Remarks
For more information, see System.String.Compare
.
Applies to
AreNotEqual(Single, Single, Single, String)
Asserts that two float
values are not equal within a specified precision, with a specified
message in the exception object.
public:
static void AreNotEqual(float expected, float actual, float delta, System::String ^ message);
public static void AreNotEqual (float expected, float actual, float delta, string message);
static member AreNotEqual : single * single * single * string -> unit
Public Shared Sub AreNotEqual (expected As Single, actual As Single, delta As Single, message As String)
Parameters
- expected
- Single
The expected value.
- actual
- Single
The value to be tested.
- delta
- Single
The test's precision. This value must be positive.
- message
- String
The message string.
Exceptions
If the expected and actual values are equal.
If delta is negative.
Remarks
The assertion fails if the absolute value of the difference between the expected and actual values is less than or equal to delta.
Applies to
AreNotEqual(Object, Object, String, Object[])
Asserts that two object instances are not equal, with a specified message in the exception object.
public:
static void AreNotEqual(System::Object ^ expected, System::Object ^ actual, System::String ^ format, ... cli::array <System::Object ^> ^ args);
public static void AreNotEqual (object expected, object actual, string format, params object[] args);
static member AreNotEqual : obj * obj * string * obj[] -> unit
Public Shared Sub AreNotEqual (expected As Object, actual As Object, format As String, ParamArray args As Object())
Parameters
- expected
- Object
The expected object.
- actual
- Object
The actual object.
- format
- String
A message format string. The syntax for this string is identical to the format string
used by Console.Writeline
. In particular, insert "{0}", "{1}" and so on at appropriate
locations in the string to represent the values of the variables in the args
array.
- args
- Object[]
One or more variables. whose values are to be inserted in format
.
Exceptions
If the objects are equal.
Remarks
The assertion fails if object.Equals(expected, actual)
returns true
.
Applies to
AreNotEqual(Double, Double, Double, String)
Asserts that two double
values are not equal within a specified precision, with a specified
message in the exception object.
public:
static void AreNotEqual(double expected, double actual, double delta, System::String ^ message);
public static void AreNotEqual (double expected, double actual, double delta, string message);
static member AreNotEqual : double * double * double * string -> unit
Public Shared Sub AreNotEqual (expected As Double, actual As Double, delta As Double, message As String)
Parameters
- expected
- Double
The expected value.
- actual
- Double
The value to be tested.
- delta
- Double
The test's precision. This value must be positive.
- message
- String
The message string.
Exceptions
If the expected and actual values are equal.
If delta is negative.
Remarks
The assertion fails if the absolute value of the difference between the expected and actual values is less than or equal to delta.
Applies to
AreNotEqual(String, String, Boolean)
Asserts that two strings are not equal.
public:
static void AreNotEqual(System::String ^ expected, System::String ^ actual, bool ignoreCase);
public static void AreNotEqual (string expected, string actual, bool ignoreCase);
static member AreNotEqual : string * string * bool -> unit
Public Shared Sub AreNotEqual (expected As String, actual As String, ignoreCase As Boolean)
Parameters
- expected
- String
The expected string.
- actual
- String
The actual string.
- ignoreCase
- Boolean
Set this value to true
for case-sensitive comparison
and false otherwise.
Exceptions
If the strings are equal.
Applies to
AreNotEqual(Single, Single, Single)
Asserts that two float
values are not equal within a specified precision.
public:
static void AreNotEqual(float expected, float actual, float delta);
public static void AreNotEqual (float expected, float actual, float delta);
static member AreNotEqual : single * single * single -> unit
Public Shared Sub AreNotEqual (expected As Single, actual As Single, delta As Single)
Parameters
- expected
- Single
The expected value.
- actual
- Single
The value to be tested.
- delta
- Single
The test's precision. This value must be positive.
Exceptions
If the expected and actual values are equal.
If delta is negative.
Remarks
The assertion fails if the absolute value of the difference between the expected and actual values is less than or equal to delta.
Applies to
AreNotEqual(Object, Object, String)
Asserts that two object instances are not equal, with a specified message in the exception object.
public:
static void AreNotEqual(System::Object ^ expected, System::Object ^ actual, System::String ^ message);
public static void AreNotEqual (object expected, object actual, string message);
static member AreNotEqual : obj * obj * string -> unit
Public Shared Sub AreNotEqual (expected As Object, actual As Object, message As String)
Parameters
- expected
- Object
The expected object.
- actual
- Object
The actual object.
- message
- String
The message string.
Exceptions
If the objects are equal.
Remarks
The assertion fails if object.Equals(expected, actual)
returns true
.
Applies to
AreNotEqual(Double, Double, Double)
Asserts that two double
values are not equal within a specified precision.
public:
static void AreNotEqual(double expected, double actual, double delta);
public static void AreNotEqual (double expected, double actual, double delta);
static member AreNotEqual : double * double * double -> unit
Public Shared Sub AreNotEqual (expected As Double, actual As Double, delta As Double)
Parameters
- expected
- Double
The expected value.
- actual
- Double
The value to be tested.
- delta
- Double
The test's precision. This value must be positive.
Exceptions
If the expected and actual values are equal.
If delta is negative.
Remarks
The assertion fails if the absolute value of the difference between the expected and actual values is less than or equal to delta.
Applies to
AreNotEqual(Object, Object)
Asserts that two object instances are not equal.
public:
static void AreNotEqual(System::Object ^ expected, System::Object ^ actual);
public static void AreNotEqual (object expected, object actual);
static member AreNotEqual : obj * obj -> unit
Public Shared Sub AreNotEqual (expected As Object, actual As Object)
Parameters
- expected
- Object
The expected object.
- actual
- Object
The actual object.
Exceptions
If the objects are equal.
Remarks
The assertion fails if object.Equals(expected, actual)
returns true
.
Applies to
AreNotEqual<T>(T, T)
Asserts that two object instances with a specified type are not equal.
public:
generic <typename T>
static void AreNotEqual(T expected, T actual);
public static void AreNotEqual<T> (T expected, T actual);
static member AreNotEqual : 'T * 'T -> unit
Public Shared Sub AreNotEqual(Of T) (expected As T, actual As T)
Type Parameters
- T
The objects' type.
Parameters
- expected
- T
The expected object.
- actual
- T
The actual object.
Exceptions
If the objects are equal.
Remarks
The assertion fails if object.Equals(expected, actual)
returns true
.
Applies to
AreNotEqual<T>(T, T, PexEqualityComparison<T>)
Asserts that two object instances with a specified type are not equal,
based on an EqualityComparison
delegate.
public:
generic <typename T>
static void AreNotEqual(T expected, T actual, Microsoft::Pex::Framework::PexEqualityComparison<T> ^ comparison);
public static void AreNotEqual<T> (T expected, T actual, Microsoft.Pex.Framework.PexEqualityComparison<T> comparison);
static member AreNotEqual : 'T * 'T * Microsoft.Pex.Framework.PexEqualityComparison<'T> -> unit
Public Shared Sub AreNotEqual(Of T) (expected As T, actual As T, comparison As PexEqualityComparison(Of T))
Type Parameters
- T
The objects' type.
Parameters
- expected
- T
The expected object.
- actual
- T
The actual object.
- comparison
- PexEqualityComparison<T>
An EqualityComparison
delegate, which returns true
if the two objects are equal and false
otherwise.
Exceptions
If the objects are equal.
Applies to
AreNotEqual<T>(T, T, String)
Asserts that two object instances with a specified type are not equal, with a specified message in the exception object.
public:
generic <typename T>
static void AreNotEqual(T expected, T actual, System::String ^ message);
public static void AreNotEqual<T> (T expected, T actual, string message);
static member AreNotEqual : 'T * 'T * string -> unit
Public Shared Sub AreNotEqual(Of T) (expected As T, actual As T, message As String)
Type Parameters
- T
The object's type.
Parameters
- expected
- T
The expected object.
- actual
- T
The actual object.
- message
- String
The message string.
Exceptions
If the objects are equal.
Applies to
AreNotEqual<T>(T, T, String, Object[])
Asserts that two object instances with a specified type are not equal, with a specified message in the exception object.
public:
generic <typename T>
static void AreNotEqual(T expected, T actual, System::String ^ format, ... cli::array <System::Object ^> ^ args);
public static void AreNotEqual<T> (T expected, T actual, string format, params object[] args);
static member AreNotEqual : 'T * 'T * string * obj[] -> unit
Public Shared Sub AreNotEqual(Of T) (expected As T, actual As T, format As String, ParamArray args As Object())
Type Parameters
- T
The objects' type.
Parameters
- expected
- T
The expected object.
- actual
- T
The actual object.
- format
- String
A message format string. The syntax for this string is identical to the format string
used by Console.Writeline
. In particular, insert "{0}", "{1}" and so on at appropriate
locations in the string to represent the values of the variables in the args
array.
- args
- Object[]
One or more variables. whose values are to be inserted in format
.
Exceptions
If the objects are equal.
Remarks
The assertion fails if object.Equals(expected, actual)
returns true
.