public final class

SparseBooleanArraySubject

extends Subject
java.lang.Object
   ↳ com.google.common.truth.Subject
     ↳ androidx.test.ext.truth.util.SparseBooleanArraySubject

Class Overview

Subject for making assertions about SparseBooleanArrays.

Summary

Public Methods
static SparseBooleanArraySubject assertThat(SparseBooleanArray actual)
Begins an assertion on a SparseBooleanArray
void containsKey(int key)
Assert that a SparseBooleanArray contains the given key
void doesNotContainKey(int key)
Assert that a SparseBooleanArray doesn't contain the given key
static AssertionError expectFailure(SimpleSubjectBuilderCallback<SparseBooleanArraySubjectSparseBooleanArray> callback)
Begins an assertion on a SparseBooleanArray where a predicate is expected to fail
void hasFalseValueAt(int key)
Assert that a SparseBooleanArray for the given key returns the value false
void hasSize(int size)
Assert that a SparseBooleanArray has size
void hasTrueValueAt(int key)
Assert that a SparseBooleanArray for the given key returns the value true
void isEmpty()
Assert that a SparseBooleanArray is empty
void isNotEmpty()
Assert that a SparseBooleanArray is not empty
[Expand]
Inherited Methods
From class com.google.common.truth.Subject
From class java.lang.Object

Public Methods

public static SparseBooleanArraySubject assertThat (SparseBooleanArray actual)

Begins an assertion on a SparseBooleanArray

Parameters
actual SparseBooleanArray
Returns
SparseBooleanArraySubject

public void containsKey (int key)

Assert that a SparseBooleanArray contains the given key

Parameters
key int

public void doesNotContainKey (int key)

Assert that a SparseBooleanArray doesn't contain the given key

Parameters
key int

public static AssertionError expectFailure (SimpleSubjectBuilderCallback<SparseBooleanArraySubjectSparseBooleanArray> callback)

Begins an assertion on a SparseBooleanArray where a predicate is expected to fail

Parameters
callback SimpleSubjectBuilderCallback
Returns
AssertionError

public void hasFalseValueAt (int key)

Assert that a SparseBooleanArray for the given key returns the value false

Parameters
key int

public void hasSize (int size)

Assert that a SparseBooleanArray has size

Parameters
size int

public void hasTrueValueAt (int key)

Assert that a SparseBooleanArray for the given key returns the value true

Parameters
key int

public void isEmpty ()

Assert that a SparseBooleanArray is empty

public void isNotEmpty ()

Assert that a SparseBooleanArray is not empty