# TestWorkerBuilderKt

Added in 2.1.0

*** ** * ** ***


```
public final class TestWorkerBuilderKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/work/testing/TestWorkerBuilder<@https://developer.android.com/reference/androidx/annotation/NonNull W>` | `<W extends https://developer.android.com/reference/androidx/work/Worker> https://developer.android.com/reference/androidx/work/testing/TestWorkerBuilderKt#TestWorkerBuilder(android.content.Context,java.util.concurrent.Executor,androidx.work.Data,kotlin.collections.List,kotlin.Int,kotlin.collections.List,kotlin.collections.List)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html executor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/work/Data inputData, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> tags, int runAttemptCount, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html> triggeredContentUris, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> triggeredContentAuthorities )` Builds an instance of `https://developer.android.com/reference/androidx/work/testing/package-summary#TestWorkerBuilder(android.content.Context,java.util.concurrent.Executor,androidx.work.Data,kotlin.collections.List,kotlin.Int,kotlin.collections.List,kotlin.collections.List)`. |

## Public methods

### TestWorkerBuilder

Artifact: [androidx.work:work-testing](https://developer.android.com/jetpack/androidx/releases/work) [View Source](https://cs.android.com/search?q=file:androidx/work/testing/TestWorkerBuilder.kt+function:TestWorkerBuilder)

```
public static final @NonNull TestWorkerBuilder<@NonNull W> <W extends Worker> TestWorkerBuilder(
    @NonNull Context context,
    @NonNull Executor executor,
    @NonNull Data inputData,
    @NonNull List<@NonNull String> tags,
    int runAttemptCount,
    @NonNull List<@NonNull Uri> triggeredContentUris,
    @NonNull List<@NonNull String> triggeredContentAuthorities
)
```

Builds an instance of `https://developer.android.com/reference/androidx/work/testing/package-summary#TestWorkerBuilder(android.content.Context,java.util.concurrent.Executor,androidx.work.Data,kotlin.collections.List,kotlin.Int,kotlin.collections.List,kotlin.collections.List)`.

| Parameters |
|---|---|
| `<W extends https://developer.android.com/reference/androidx/work/Worker>` | The subtype of `https://developer.android.com/reference/androidx/work/Worker` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context` | The application `https://developer.android.com/reference/android/content/Context.html` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html executor` | The `https://developer.android.com/reference/java/util/concurrent/Executor.html` that the `https://developer.android.com/reference/androidx/work/Worker` runs on |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/work/Data inputData` | The input data for the `https://developer.android.com/reference/androidx/work/Worker` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> tags` | The tags associated with this `https://developer.android.com/reference/androidx/work/Worker` |
| `int runAttemptCount` | The run attempt count of the `https://developer.android.com/reference/androidx/work/Worker` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html> triggeredContentUris` | The list of triggered content `https://developer.android.com/reference/android/net/Uri.html`s |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> triggeredContentAuthorities` | The list of triggered content authorities |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/work/testing/TestWorkerBuilder<@https://developer.android.com/reference/androidx/annotation/NonNull W>` | The instance of `https://developer.android.com/reference/androidx/work/testing/package-summary#TestWorkerBuilder(android.content.Context,java.util.concurrent.Executor,androidx.work.Data,kotlin.collections.List,kotlin.Int,kotlin.collections.List,kotlin.collections.List)` |