Partager via


MockContentProvider Constructors

Definition

Overloads

MockContentProvider()

A constructor using MockContext instance as a Context in it.

MockContentProvider(Context)

A constructor accepting a Context instance, which is supposed to be the subclasss of MockContext.

MockContentProvider(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

MockContentProvider(Context, String, String, PathPermission[])

A constructor which initialize four member variables which android.content.ContentProvider have internally.

MockContentProvider()

A constructor using MockContext instance as a Context in it.

[Android.Runtime.Register(".ctor", "()V", "")]
protected MockContentProvider ();
Attributes

Remarks

A constructor using MockContext instance as a Context in it.

Java documentation for android.test.mock.MockContentProvider.MockContentProvider().

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

MockContentProvider(Context)

A constructor accepting a Context instance, which is supposed to be the subclasss of MockContext.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "")]
public MockContentProvider (Android.Content.Context? context);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "")>]
new Android.Test.Mock.MockContentProvider : Android.Content.Context -> Android.Test.Mock.MockContentProvider

Parameters

context
Context
Attributes

Remarks

A constructor accepting a Context instance, which is supposed to be the subclasss of MockContext.

Java documentation for android.test.mock.MockContentProvider.MockContentProvider(android.content.Context).

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

MockContentProvider(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected MockContentProvider (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Test.Mock.MockContentProvider : nativeint * Android.Runtime.JniHandleOwnership -> Android.Test.Mock.MockContentProvider

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

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

MockContentProvider(Context, String, String, PathPermission[])

A constructor which initialize four member variables which android.content.ContentProvider have internally.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;[Landroid/content/pm/PathPermission;)V", "")]
public MockContentProvider (Android.Content.Context? context, string? readPermission, string? writePermission, Android.Content.PM.PathPermission[]? pathPermissions);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;[Landroid/content/pm/PathPermission;)V", "")>]
new Android.Test.Mock.MockContentProvider : Android.Content.Context * string * string * Android.Content.PM.PathPermission[] -> Android.Test.Mock.MockContentProvider

Parameters

context
Context

A Context object which should be some mock instance (like the instance of android.test.mock.MockContext).

readPermission
String

The read permision you want this instance should have in the test, which is available via #getReadPermission().

writePermission
String

The write permission you want this instance should have in the test, which is available via #getWritePermission().

pathPermissions
PathPermission[]

The PathPermissions you want this instance should have in the test, which is available via #getPathPermissions().

Attributes

Remarks

A constructor which initialize four member variables which android.content.ContentProvider have internally.

Java documentation for android.test.mock.MockContentProvider.MockContentProvider(android.content.Context, java.lang.String, java.lang.String, android.content.pm.PathPermission[]).

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