# SparseBooleanArraySubject

Artifact: [androidx.test.ext:truth](https://developer.android.com/jetpack/androidx/releases/test-ext) [View Source](https://cs.android.com/search?q=file:androidx/test/ext/truth/util/SparseBooleanArraySubject.java+class:androidx.test.ext.truth.util.SparseBooleanArraySubject)

*** ** * ** ***

<br />

```
class SparseBooleanArraySubject : Subject
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [com.google.common.truth.Subject](https://truth.dev/api/0.41/com/google/common/truth/Subject.html) ||
|   | ↳ | [androidx.test.ext.truth.util.SparseBooleanArraySubject](https://developer.android.com/reference/kotlin/androidx/test/ext/truth/util/SparseBooleanArraySubject) |

*** ** * ** ***

Subject for making assertions about `https://developer.android.com/reference/android/util/SparseBooleanArray.html`s.

## Summary

| ### Public functions |
|---|---|
| `java-static https://developer.android.com/reference/kotlin/androidx/test/ext/truth/util/SparseBooleanArraySubject!` | `https://developer.android.com/reference/kotlin/androidx/test/ext/truth/util/SparseBooleanArraySubject#assertThat(android.util.SparseBooleanArray)(actual: https://developer.android.com/reference/android/util/SparseBooleanArray.html!)` Begins an assertion on a `https://developer.android.com/reference/android/util/SparseBooleanArray.html` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/ext/truth/util/SparseBooleanArraySubject#containsKey(int)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Assert that a `https://developer.android.com/reference/android/util/SparseBooleanArray.html` contains the given key |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/ext/truth/util/SparseBooleanArraySubject#doesNotContainKey(int)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Assert that a `https://developer.android.com/reference/android/util/SparseBooleanArray.html` doesn't contain the given key |
| `java-static https://developer.android.com/reference/java/lang/AssertionError.html!` | `https://developer.android.com/reference/kotlin/androidx/test/ext/truth/util/SparseBooleanArraySubject#expectFailure(com.google.common.truth.ExpectFailure.SimpleSubjectBuilderCallback<androidx.test.ext.truth.util.SparseBooleanArraySubject,android.util.SparseBooleanArray>)( callback: https://truth.dev/api/0.41/com/google/common/truth/ExpectFailure.SimpleSubjectBuilderCallback.html<https://developer.android.com/reference/kotlin/androidx/test/ext/truth/util/SparseBooleanArraySubject!, https://developer.android.com/reference/android/util/SparseBooleanArray.html!>! )` Begins an assertion on a `https://developer.android.com/reference/android/util/SparseBooleanArray.html` where a predicate is expected to fail |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/ext/truth/util/SparseBooleanArraySubject#hasFalseValueAt(int)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Assert that a `https://developer.android.com/reference/android/util/SparseBooleanArray.html` for the given key returns the value false |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/ext/truth/util/SparseBooleanArraySubject#hasSize(int)(size: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Assert that a `https://developer.android.com/reference/android/util/SparseBooleanArray.html` has size |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/ext/truth/util/SparseBooleanArraySubject#hasTrueValueAt(int)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Assert that a `https://developer.android.com/reference/android/util/SparseBooleanArray.html` for the given key returns the value true |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/ext/truth/util/SparseBooleanArraySubject#isEmpty()()` Assert that a `https://developer.android.com/reference/android/util/SparseBooleanArray.html` is empty |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/ext/truth/util/SparseBooleanArraySubject#isNotEmpty()()` Assert that a `https://developer.android.com/reference/android/util/SparseBooleanArray.html` is not empty |

### Inherited functions

From [com.google.common.truth.Subject](https://truth.dev/api/0.41/com/google/common/truth/Subject.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#actualCustomStringRepresentation--()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#equals-java.lang.Object-(o: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#failWithActual-java.lang.String-java.lang.Object-(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#failWithoutActual-com.google.common.truth.Fact-com.google.common.truth.Fact...-(first: https://truth.dev/api/0.41/com/google/common/truth/Fact.html!, rest: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://truth.dev/api/0.41/com/google/common/truth/Fact.html!>!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#hashCode--()`

**This function is deprecated.**
`https://truth.dev/api/0.41/com/google/common/truth/StandardSubjectBuilder.html!` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#ignoreCheck--()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#isAnyOf-java.lang.Object-java.lang.Object-java.lang.Object...-(first: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!, second: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!, rest: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#isEqualTo-java.lang.Object-(expected: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#isIn-java.lang.Iterable&lt;?&gt;-(iterable: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-iterable/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/index.html<*>!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#isInstanceOf-java.lang.Class&lt;?&gt;-(clazz: https://developer.android.com/reference/java/lang/Class.html<*>!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#isNoneOf-java.lang.Object-java.lang.Object-java.lang.Object...-(first: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!, second: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!, rest: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#isNotEqualTo-java.lang.Object-(unexpected: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#isNotIn-java.lang.Iterable&lt;?&gt;-(iterable: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-iterable/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/index.html<*>!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#isNotInstanceOf-java.lang.Class&lt;?&gt;-(clazz: https://developer.android.com/reference/java/lang/Class.html<*>!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#isNotNull--()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#isNotSameInstanceAs-java.lang.Object-(unexpected: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#isNull--()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#isSameInstanceAs-java.lang.Object-(expected: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://truth.dev/api/0.41/com/google/common/truth/Subject.html#toString--()`

## Public functions

### assertThat

```
java-static fun assertThat(actual: SparseBooleanArray!): SparseBooleanArraySubject!
```

Begins an assertion on a `https://developer.android.com/reference/android/util/SparseBooleanArray.html`

### containsKey

```
fun containsKey(key: Int): Unit
```

Assert that a `https://developer.android.com/reference/android/util/SparseBooleanArray.html` contains the given key

### doesNotContainKey

```
fun doesNotContainKey(key: Int): Unit
```

Assert that a `https://developer.android.com/reference/android/util/SparseBooleanArray.html` doesn't contain the given key

### expectFailure

```
java-static fun expectFailure(
    callback: ExpectFailure.SimpleSubjectBuilderCallback<SparseBooleanArraySubject!, SparseBooleanArray!>!
): AssertionError!
```

Begins an assertion on a `https://developer.android.com/reference/android/util/SparseBooleanArray.html` where a predicate is expected to fail

### hasFalseValueAt

```
fun hasFalseValueAt(key: Int): Unit
```

Assert that a `https://developer.android.com/reference/android/util/SparseBooleanArray.html` for the given key returns the value false

### hasSize

```
fun hasSize(size: Int): Unit
```

Assert that a `https://developer.android.com/reference/android/util/SparseBooleanArray.html` has size

### hasTrueValueAt

```
fun hasTrueValueAt(key: Int): Unit
```

Assert that a `https://developer.android.com/reference/android/util/SparseBooleanArray.html` for the given key returns the value true

### isEmpty

```
fun isEmpty(): Unit
```

Assert that a `https://developer.android.com/reference/android/util/SparseBooleanArray.html` is empty

### isNotEmpty

```
fun isNotEmpty(): Unit
```

Assert that a `https://developer.android.com/reference/android/util/SparseBooleanArray.html` is not empty