语言

MoreAsserts 类

定义

注意

This class is obsoleted in this android platform

包含 JUnit 中未找到的其他断言方法。

[Android.Runtime.Register("android/test/MoreAsserts", DoNotGenerateAcw=true)]
[System.Obsolete("This class is obsoleted in this android platform")]
public sealed class MoreAsserts : Java.Lang.Object
[<Android.Runtime.Register("android/test/MoreAsserts", DoNotGenerateAcw=true)>]
[<System.Obsolete("This class is obsoleted in this android platform")>]
type MoreAsserts = class
    inherit Object
继承
MoreAsserts
特性

注解

包含 JUnit 中未找到的其他断言方法。

此成员已弃用。 请改用 Hamcrest 匹配器 。

适用于 . 的 android.test.MoreAssertsJava 文档

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

属性

名称 说明
Class
已过时.

返回此 Object的运行时类。

(继承自 Object)
Handle
已过时.

基础 Android 实例的句柄。

(继承自 Object)
JniIdentityHashCode
已过时.

获取互操作运行时分配给此Java对等的标识哈希代码。

(继承自 Object)
JniManagedPeerState
已过时.

包含 JUnit 中未找到的其他断言方法。

(继承自 JavaObject)
JniPeerMembers
已过时.

获取用于访问此Java绑定成员的 JNI 元数据。

PeerReference
已过时.

获取此Java对等方的 JNI 对象引用。

(继承自 Object)
ThresholdClass
已过时.

此 API 支持 Mono for Android 基础结构,不打算直接从代码使用。

(继承自 Object)
ThresholdType
已过时.

此 API 支持 Mono for Android 基础结构,不打算直接从代码使用。

(继承自 Object)

方法

名称 说明
AssertAssignableFrom(Class, Class)
已过时.

断言该类 expected 可从类 actual中分配 。

AssertAssignableFrom(Class, Object)
已过时.

断言该类 expected 可从对象 actual中分配 。

AssertContainsRegex(String, String, String)
已过时.

断言,它 expectedRegex 与任何子字符串 actual 匹配且失败 message (如果不存在)。

AssertContainsRegex(String, String)
已过时.

使用泛型消息的 #assertContainsRegex(String,String,String) 变体。

AssertContentsInAnyOrder(IIterable, Object[])
已过时.

assertContentsInAnyOrder(String, Iterable<?>, Object) 的变体。

AssertContentsInAnyOrder(String, IIterable, Object[])
已过时.

assertContentsInAnyOrder(String, Iterable<?>, Object) 的变体。

AssertContentsInOrder(IIterable, Object[])
已过时.

assertContentsInOrder(String, Iterable<?>, Object) 的变体。

AssertContentsInOrder(String, IIterable, Object[])
已过时.

assertContentsInOrder(String, Iterable<?>, Object) 的变体。

AssertEmpty(IDictionary<Object,Object>)
已过时.

使用泛型消息的 #assertEmpty(String, Map) 变体。

AssertEmpty(IIterable)
已过时.

使用泛型消息的 #assertEmpty(String, Iterable) 变体。

AssertEmpty(String, IDictionary<Object,Object>)
已过时.

断言为 map 空。

AssertEmpty(String, IIterable)
已过时.

断言为 iterable 空。

AssertEquals(Byte[], Byte[])
已过时.

断言数组 actual 的大小相同,并且每个元素都等于数组 expected中的元素。

AssertEquals(Double[], Double[])
已过时.

断言数组 actual 的大小相同,并且每个元素都等于数组 expected中的元素。

AssertEquals(ICollection<Object>, ICollection<Object>)
已过时.

断言两个集包含相同的元素。

AssertEquals(Int32[], Int32[])
已过时.

断言数组 actual 的大小相同,并且每个元素都等于数组 expected中的元素。

AssertEquals(Object[], Object[])
已过时.

断言数组 actual 的大小相同,并且每个元素与数组 expected中的元素相同。

AssertEquals(String, Byte[], Byte[])
已过时.

断言数组 actual 的大小相同,并且每个元素都等于数组 expected中的元素。

AssertEquals(String, Double[], Double[])
已过时.

断言数组 actual 的大小相同,并且每个元素都等于数组 expected中的元素。

AssertEquals(String, ICollection<Object>, ICollection<Object>)
已过时.

断言两个集包含相同的元素。

AssertEquals(String, Int32[], Int32[])
已过时.

断言数组 actual 的大小相同,并且每个元素都等于数组 expected中的元素。

AssertEquals(String, Object[], Object[])
已过时.

断言数组 actual 的大小相同,并且每个元素与数组 expected中的元素相同。

AssertMatchesRegex(String, String, String)
已过时.

断言完全 expectedRegex 匹配 actual ,如果不匹配,则失败 message 。

AssertMatchesRegex(String, String)
已过时.

使用泛型消息的 #assertMatchesRegex(String,String,String) 变体。

AssertNotContainsRegex(String, String, String)
已过时.

断言与 expectedRegex 任何子字符串 actual不匹配,如果失败,则失败 message 。

AssertNotContainsRegex(String, String)
已过时.

使用泛型消息的 #assertNotContainsRegex(String,String,String) 变体。

AssertNotEmpty(IDictionary<Object,Object>)
已过时.

使用泛型消息的 #assertNotEmpty(String, Map) 变体。

AssertNotEmpty(IIterable)
已过时.

使用泛型消息的 assertNotEmpty(String, Iterable<?>)变体。

AssertNotEmpty(String, IDictionary<Object,Object>)
已过时.

map断言不为空。

AssertNotEmpty(String, IIterable)
已过时.

iterable断言不为空。

AssertNotEqual(Object, Object)
已过时.

使用泛型消息的 #assertNotEqual(String,Object,Object) 变体。

AssertNotEqual(String, Object, Object)
已过时.

断言不 actual 相等 unexpected,根据这两者 == 以及 Object#equals。

AssertNotMatchesRegex(String, String, String)
已过时.

expectedRegex断言不完全匹配actual,如果不匹配,则失败message。

AssertNotMatchesRegex(String, String)
已过时.

使用泛型消息的 #assertNotMatchesRegex(String,String,String) 变体。

CheckEqualsAndHashCodeMethods(Object, Object, Boolean)
已过时.

checkEqualsAndHashCodeMethods(String,Object,Object,boolean 类型的值)。

CheckEqualsAndHashCodeMethods(String, Object, Object, Boolean)
已过时.

用于一次性测试 equals() 和 hashCode() 结果的实用工具。

Clone()
已过时.

创建并返回此对象的副本。

(继承自 Object)
Construct(JniObjectReference, JniObjectReferenceOptions)
已过时.

包含 JUnit 中未找到的其他断言方法。

(继承自 JavaObject)
Dispose()
已过时.

释放此Java对等方持有的资源。

(继承自 Object)
Dispose(Boolean)
已过时.

释放此Java对等方持有的资源。

(继承自 Object)
DisposeUnlessReferenced()
已过时.

包含 JUnit 中未找到的其他断言方法。

(继承自 JavaObject)
Equals(Object)
已过时.

包含 JUnit 中未找到的其他断言方法。

(继承自 JavaObject)
Equals(Object)
已过时.

指示其他对象是否“等于”此对象。

(继承自 Object)
GetHashCode()
已过时.

返回对象的哈希代码值。

(继承自 Object)
JavaFinalize()
已过时.

当垃圾回收确定不再引用该对象时,由对象上的垃圾回收器调用。

(继承自 Object)
Notify()
已过时.

唤醒正在等待此对象的监视器的单个线程。

(继承自 Object)
NotifyAll()
已过时.

唤醒正在等待此对象的监视器的所有线程。

(继承自 Object)
SetHandle(IntPtr, JniHandleOwnership)
已过时.

设置 Handle 属性。

(继承自 Object)
SetPeerReference(JniObjectReference, JniObjectReferenceOptions)
已过时.

包含 JUnit 中未找到的其他断言方法。

(继承自 JavaObject)
ToArray<T>()
已过时.

从此Java数组包装器创建托管数组。

(继承自 Object)
ToString()
已过时.

返回对象的字符串表示形式。

(继承自 Object)
UnregisterFromRuntime()
已过时.

从互操作运行时取消注册此Java对等。

(继承自 Object)
Wait()
已过时.

使当前线程等待,直到唤醒它,通常是通过 em 通知/em< 或 >em<interrupted>/em<。><>

(继承自 Object)
Wait(Int64, Int32)
已过时.

使当前线程等待直到唤醒,通常是通过 <em>通知</em> 或 <em interrupted>/em<>,或直到经过一定数量的实时。

(继承自 Object)
Wait(Int64)
已过时.

使当前线程等待直到唤醒,通常是通过 <em>通知</em> 或 <em interrupted>/em<>,或直到经过一定数量的实时。

(继承自 Object)

显式接口实现

名称 说明
IJavaPeerable.Disposed()
已过时.

包含 JUnit 中未找到的其他断言方法。

(继承自 JavaObject)
IJavaPeerable.Finalized()
已过时.

包含 JUnit 中未找到的其他断言方法。

(继承自 JavaObject)
IJavaPeerable.JniObjectReferenceControlBlock
已过时.

包含 JUnit 中未找到的其他断言方法。

(继承自 JavaObject)
IJavaPeerable.SetJniIdentityHashCode(Int32)
已过时.

包含 JUnit 中未找到的其他断言方法。

(继承自 JavaObject)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates)
已过时.

包含 JUnit 中未找到的其他断言方法。

(继承自 JavaObject)
IJavaPeerable.SetPeerReference(JniObjectReference)
已过时.

包含 JUnit 中未找到的其他断言方法。

(继承自 JavaObject)

扩展方法

名称 说明
GetJniTypeName(IJavaPeerable)
已过时.

获取实例 self类型的 JNI 名称。

JavaAs<TResult>(IJavaPeerable)
已过时.

尝试强制self键入TResult,检查强制是否在Java端有效。

JavaCast<TResult>(IJavaObject)
已过时.

执行 Android 运行时检查的类型转换。

JavaCast<TResult>(IJavaObject)
已过时.

包含 JUnit 中未找到的其他断言方法。

TryJavaCast<TResult>(IJavaPeerable, TResult)
已过时.

尝试强制self键入TResult,检查强制是否在Java端有效。

适用于