# PrepareGetCredentialResponse.TestBuilder

Artifact: [androidx.credentials:credentials](https://developer.android.com/jetpack/androidx/releases/credentials) [View Source](https://cs.android.com/search?q=file:androidx/credentials/PrepareGetCredentialResponse.kt+class:androidx.credentials.PrepareGetCredentialResponse.TestBuilder) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

*** ** * ** ***

<br />

```
@VisibleForTesting
class PrepareGetCredentialResponse.TestBuilder
```

<br />

*** ** * ** ***

A builder for `https://developer.android.com/reference/android/credentials/PrepareGetCredentialResponse.html` for test use only.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/PrepareGetCredentialResponse.TestBuilder#TestBuilder()()` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/PrepareGetCredentialResponse` | `https://developer.android.com/reference/kotlin/androidx/credentials/PrepareGetCredentialResponse.TestBuilder#build()()` Builds a `https://developer.android.com/reference/android/credentials/PrepareGetCredentialResponse.html`. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/PrepareGetCredentialResponse.TestBuilder` | `@https://developer.android.com/reference/kotlin/androidx/annotation/VisibleForTesting https://developer.android.com/reference/kotlin/androidx/credentials/PrepareGetCredentialResponse.TestBuilder#setCredentialTypeDelegate(kotlin.Function1)(handler: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets the credential type handler. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/PrepareGetCredentialResponse.TestBuilder` | `@https://developer.android.com/reference/kotlin/androidx/annotation/VisibleForTesting https://developer.android.com/reference/kotlin/androidx/credentials/PrepareGetCredentialResponse.TestBuilder#setHasAuthResultsDelegate(kotlin.Function0)(handler: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets the has authentication results bit. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/PrepareGetCredentialResponse.TestBuilder` | `@https://developer.android.com/reference/kotlin/androidx/annotation/VisibleForTesting https://developer.android.com/reference/kotlin/androidx/credentials/PrepareGetCredentialResponse.TestBuilder#setHasRemoteResultsDelegate(kotlin.Function0)(handler: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets the has remote results bit. |

## Public constructors

### TestBuilder

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
TestBuilder()
```

## Public functions

### build

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
fun build(): PrepareGetCredentialResponse
```

Builds a `https://developer.android.com/reference/android/credentials/PrepareGetCredentialResponse.html`.

### setCredentialTypeDelegate

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
@VisibleForTesting
fun setCredentialTypeDelegate(handler: (String) -> Boolean): PrepareGetCredentialResponse.TestBuilder
```

Sets the credential type handler.

### setHasAuthResultsDelegate

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
@VisibleForTesting
fun setHasAuthResultsDelegate(handler: () -> Boolean): PrepareGetCredentialResponse.TestBuilder
```

Sets the has authentication results bit.

### setHasRemoteResultsDelegate

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
@VisibleForTesting
fun setHasRemoteResultsDelegate(handler: () -> Boolean): PrepareGetCredentialResponse.TestBuilder
```

Sets the has remote results bit.