Dela via


MoreAsserts Class

Definition

Contains additional assertion methods not found in JUnit.

[Android.Runtime.Register("android/test/MoreAsserts", DoNotGenerateAcw=true)]
public sealed class MoreAsserts : Java.Lang.Object
[<Android.Runtime.Register("android/test/MoreAsserts", DoNotGenerateAcw=true)>]
type MoreAsserts = class
    inherit Object
Inheritance
MoreAsserts
Attributes

Remarks

Contains additional assertion methods not found in JUnit.

This member is deprecated. Use Hamcrest matchers instead.

Java documentation for android.test.MoreAsserts.

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.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)

Methods

AssertAssignableFrom(Class, Class)

Asserts that class expected is assignable from the class actual.

AssertAssignableFrom(Class, Object)

Asserts that the class expected is assignable from the object actual.

AssertContainsRegex(String, String, String)

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

AssertContainsRegex(String, String)

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

AssertContentsInAnyOrder(IIterable, Object[])

Variant of assertContentsInAnyOrder(String, Iterable<?>, Object.

AssertContentsInAnyOrder(String, IIterable, Object[])

Variant of assertContentsInAnyOrder(String, Iterable<?>, Object.

AssertContentsInOrder(IIterable, Object[])

Variant of assertContentsInOrder(String, Iterable<?>, Object.

AssertContentsInOrder(String, IIterable, Object[])

Variant of assertContentsInOrder(String, Iterable<?>, Object.

AssertEmpty(IDictionary<Object,Object>)

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

AssertEmpty(IIterable)

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

AssertEmpty(String, IDictionary<Object,Object>)

Asserts that map is empty.

AssertEmpty(String, IIterable)

Asserts that iterable is empty.

AssertEquals(Byte[], Byte[])

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

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(Int32[], Int32[])

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(String, Byte[], Byte[])

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, ICollection<Object>, ICollection<Object>)

Asserts that two sets contain the same elements.

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

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.

AssertMatchesRegex(String, String, String)

Asserts that expectedRegex exactly matches actual and fails with message if it does not.

AssertMatchesRegex(String, String)

Variant of #assertMatchesRegex(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.

AssertNotEmpty(IDictionary<Object,Object>)

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

AssertNotEmpty(IIterable)

Variant of assertNotEmpty(String, Iterable<?>) using a generic message.

AssertNotEmpty(String, IDictionary<Object,Object>)

Asserts that map is not empty.

AssertNotEmpty(String, IIterable)

Asserts that iterable is not empty.

AssertNotEqual(Object, Object)

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

AssertNotEqual(String, Object, Object)

Asserts that actual is not equal unexpected, according to both == and Object#equals.

AssertNotMatchesRegex(String, String, String)

Asserts that expectedRegex does not exactly match actual, and fails with message if it does.

AssertNotMatchesRegex(String, String)

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

CheckEqualsAndHashCodeMethods(Object, Object, Boolean)

Variant of checkEqualsAndHashCodeMethods(String,Object,Object,boolean.

CheckEqualsAndHashCodeMethods(String, Object, Object, Boolean)

Utility for testing equals() and hashCode() results at once.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to