Language

MoreAsserts.AssertEquals Method

Definition

Overloads

Name Description
AssertEquals(String, Int32[], Int32[])

Asserts that array actual is the same size and every element equals those in array expected.

AssertEquals(String, Double[], Double[])

Asserts that array actual is the same size and every element equals those in array expected.

AssertEquals(String, Byte[], Byte[])

Asserts that array actual is the same size and every element equals those in array expected.

AssertEquals(String, Object[], Object[])

Asserts that array actual is the same size and every element is the same as those in array expected.

AssertEquals(String, ICollection<Object>, ICollection<Object>)

Asserts that two sets contain the same elements.

AssertEquals(Double[], Double[])

Asserts that array actual is the same size and every element equals those in array expected.

AssertEquals(ICollection<Object>, ICollection<Object>)

Asserts that two sets contain the same elements.

AssertEquals(Byte[], Byte[])

Asserts that array actual is the same size and every element equals those in array expected.

AssertEquals(Object[], Object[])

Asserts that array actual is the same size and every element is the same as those in array expected.

AssertEquals(Int32[], Int32[])

Asserts that array actual is the same size and every element equals those in array expected.

AssertEquals(String, Int32[], Int32[])

Asserts that array actual is the same size and every element equals those in array expected.

[Android.Runtime.Register("assertEquals", "(Ljava/lang/String;[I[I)V", "")]
public static void AssertEquals(string? message, int[]? expected, int[]? actual);
[<Android.Runtime.Register("assertEquals", "(Ljava/lang/String;[I[I)V", "")>]
static member AssertEquals : string * int[] * int[] -> unit

Parameters

message
String

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

expected
Int32[]

The array of expected integer values.

actual
Int32[]

The integer array that must have the same length and equal values at each index.

Attributes

Remarks

Asserts that array actual is the same size and every element equals those in array expected. On failure, message indicates first specific element mismatch.

Java documentation for android.test.MoreAsserts.assertEquals(java.lang.String, int[], int[]).

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

AssertEquals(String, Double[], Double[])

Asserts that array actual is the same size and every element equals those in array expected.

[Android.Runtime.Register("assertEquals", "(Ljava/lang/String;[D[D)V", "")]
public static void AssertEquals(string? message, double[]? expected, double[]? actual);
[<Android.Runtime.Register("assertEquals", "(Ljava/lang/String;[D[D)V", "")>]
static member AssertEquals : string * double[] * double[] -> unit

Parameters

message
String

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

expected
Double[]

The array of expected double values.

actual
Double[]

The double array that must have the same length and equal values at each index, without a tolerance.

Attributes

Remarks

Asserts that array actual is the same size and every element equals those in array expected. On failure, message indicates first specific element mismatch.

Java documentation for android.test.MoreAsserts.assertEquals(java.lang.String, double[], double[]).

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

AssertEquals(String, Byte[], Byte[])

Asserts that array actual is the same size and every element equals those in array expected.

[Android.Runtime.Register("assertEquals", "(Ljava/lang/String;[B[B)V", "")]
public static void AssertEquals(string? message, byte[]? expected, byte[]? actual);
[<Android.Runtime.Register("assertEquals", "(Ljava/lang/String;[B[B)V", "")>]
static member AssertEquals : string * byte[] * byte[] -> unit

Parameters

message
String

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

expected
Byte[]

The array of expected byte values.

actual
Byte[]

The byte array that must have the same length and equal values at each index.

Attributes

Remarks

Asserts that array actual is the same size and every element equals those in array expected. On failure, message indicates specific element mismatch.

Java documentation for android.test.MoreAsserts.assertEquals(java.lang.String, byte[], byte[]).

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

AssertEquals(String, Object[], Object[])

Asserts that array actual is the same size and every element is the same as those in array expected.

[Android.Runtime.Register("assertEquals", "(Ljava/lang/String;[Ljava/lang/Object;[Ljava/lang/Object;)V", "")]
public static void AssertEquals(string? message, Java.Lang.Object[]? expected, Java.Lang.Object[]? actual);
[<Android.Runtime.Register("assertEquals", "(Ljava/lang/String;[Ljava/lang/Object;[Ljava/lang/Object;)V", "")>]
static member AssertEquals : string * Java.Lang.Object[] * Java.Lang.Object[] -> unit

Parameters

message
String

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

expected
Object[]

The array of expected objects. Elements are compared by Java equality, with null equal to null.

actual
Object[]

The array that must have the same length and equal elements at each index.

Attributes

Remarks

Asserts that array actual is the same size and every element is the same as those in array expected. Note that this uses equals() instead of == to compare the objects. null will be considered equal to null (unlike SQL). On failure, message indicates first specific element mismatch.

Java documentation for android.test.MoreAsserts.assertEquals(java.lang.String, java.lang.Object[], java.lang.Object[]).

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

AssertEquals(String, ICollection<Object>, ICollection<Object>)

Asserts that two sets contain the same elements.

[Android.Runtime.Register("assertEquals", "(Ljava/lang/String;Ljava/util/Set;Ljava/util/Set;)V", "")]
public static void AssertEquals(string? message, System.Collections.Generic.ICollection<Java.Lang.Object>? expected, System.Collections.Generic.ICollection<Java.Lang.Object>? actual);
[<Android.Runtime.Register("assertEquals", "(Ljava/lang/String;Ljava/util/Set;Ljava/util/Set;)V", "")>]
static member AssertEquals : string * System.Collections.Generic.ICollection<Java.Lang.Object> * System.Collections.Generic.ICollection<Java.Lang.Object> -> unit

Parameters

message
String

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

expected
ICollection<Object>

The expected set of elements, exposed as a collection.

actual
ICollection<Object>

The set, exposed as a collection, that must contain the same elements regardless of order.

Attributes

Remarks

Asserts that two sets contain the same elements.

Java documentation for android.test.MoreAsserts.assertEquals(java.lang.String, java.util.Set<? extends java.lang.Object>, java.util.Set<? extends java.lang.Object>).

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

AssertEquals(Double[], Double[])

Asserts that array actual is the same size and every element equals those in array expected.

[Android.Runtime.Register("assertEquals", "([D[D)V", "")]
public static void AssertEquals(double[]? expected, double[]? actual);
[<Android.Runtime.Register("assertEquals", "([D[D)V", "")>]
static member AssertEquals : double[] * double[] -> unit

Parameters

expected
Double[]

The array of expected double values.

actual
Double[]

The double array that must have the same length and equal values at each index, without a tolerance.

Attributes

Remarks

Asserts that array actual is the same size and every element equals those in array expected. On failure, message indicates first specific element mismatch.

Java documentation for android.test.MoreAsserts.assertEquals(double[], double[]).

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

AssertEquals(ICollection<Object>, ICollection<Object>)

Asserts that two sets contain the same elements.

[Android.Runtime.Register("assertEquals", "(Ljava/util/Set;Ljava/util/Set;)V", "")]
public static void AssertEquals(System.Collections.Generic.ICollection<Java.Lang.Object>? expected, System.Collections.Generic.ICollection<Java.Lang.Object>? actual);
[<Android.Runtime.Register("assertEquals", "(Ljava/util/Set;Ljava/util/Set;)V", "")>]
static member AssertEquals : System.Collections.Generic.ICollection<Java.Lang.Object> * System.Collections.Generic.ICollection<Java.Lang.Object> -> unit

Parameters

expected
ICollection<Object>

The expected set of elements, exposed as a collection.

actual
ICollection<Object>

The set, exposed as a collection, that must contain the same elements regardless of order.

Attributes

Remarks

Asserts that two sets contain the same elements.

Java documentation for android.test.MoreAsserts.assertEquals(java.util.Set<? extends java.lang.Object>, java.util.Set<? extends java.lang.Object>).

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

AssertEquals(Byte[], Byte[])

Asserts that array actual is the same size and every element equals those in array expected.

[Android.Runtime.Register("assertEquals", "([B[B)V", "")]
public static void AssertEquals(byte[]? expected, byte[]? actual);
[<Android.Runtime.Register("assertEquals", "([B[B)V", "")>]
static member AssertEquals : byte[] * byte[] -> unit

Parameters

expected
Byte[]

The array of expected byte values.

actual
Byte[]

The byte array that must have the same length and equal values at each index.

Attributes

Remarks

Asserts that array actual is the same size and every element equals those in array expected. On failure, message indicates specific element mismatch.

Java documentation for android.test.MoreAsserts.assertEquals(byte[], byte[]).

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

AssertEquals(Object[], Object[])

Asserts that array actual is the same size and every element is the same as those in array expected.

[Android.Runtime.Register("assertEquals", "([Ljava/lang/Object;[Ljava/lang/Object;)V", "")]
public static void AssertEquals(Java.Lang.Object[]? expected, Java.Lang.Object[]? actual);
[<Android.Runtime.Register("assertEquals", "([Ljava/lang/Object;[Ljava/lang/Object;)V", "")>]
static member AssertEquals : Java.Lang.Object[] * Java.Lang.Object[] -> unit

Parameters

expected
Object[]

The array of expected objects. Elements are compared by Java equality, with null equal to null.

actual
Object[]

The array that must have the same length and equal elements at each index.

Attributes

Remarks

Asserts that array actual is the same size and every element is the same as those in array expected. Note that this uses == instead of equals() to compare the objects. On failure, message indicates first specific element mismatch.

Java documentation for android.test.MoreAsserts.assertEquals(java.lang.Object[], java.lang.Object[]).

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

AssertEquals(Int32[], Int32[])

Asserts that array actual is the same size and every element equals those in array expected.

[Android.Runtime.Register("assertEquals", "([I[I)V", "")]
public static void AssertEquals(int[]? expected, int[]? actual);
[<Android.Runtime.Register("assertEquals", "([I[I)V", "")>]
static member AssertEquals : int[] * int[] -> unit

Parameters

expected
Int32[]

The array of expected integer values.

actual
Int32[]

The integer array that must have the same length and equal values at each index.

Attributes

Remarks

Asserts that array actual is the same size and every element equals those in array expected. On failure, message indicates first specific element mismatch.

Java documentation for android.test.MoreAsserts.assertEquals(int[], int[]).

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