SparseBooleanArraySubject


public final class SparseBooleanArraySubject extends Subject


Subject for making assertions about SparseBooleanArrays.

Summary

Public methods

static SparseBooleanArraySubject

Begins an assertion on a SparseBooleanArray

void
containsKey(int key)

Assert that a SparseBooleanArray contains the given key

void

Assert that a SparseBooleanArray doesn't contain the given key

static AssertionError

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

Assert that a SparseBooleanArray is empty

void

Assert that a SparseBooleanArray is not empty

Inherited methods

From com.google.common.truth.Subject
String
final boolean

This method is deprecated.

final void
final void
failWithoutActual(Fact first, Fact[] rest)
final int

This method is deprecated.

final StandardSubjectBuilder
void
isAnyOf(Object first, Object second, @Nullable Object[] rest)
void
isEqualTo(Object expected)
void
void
void
isNoneOf(Object first, Object second, @Nullable Object[] rest)
void
isNotEqualTo(Object unexpected)
void
void
void
final void
void
final void
String

This method is deprecated.

Public methods

assertThat

public static SparseBooleanArraySubject assertThat(SparseBooleanArray actual)

Begins an assertion on a SparseBooleanArray

containsKey

public void containsKey(int key)

Assert that a SparseBooleanArray contains the given key

doesNotContainKey

public void doesNotContainKey(int key)

Assert that a SparseBooleanArray doesn't contain the given key

expectFailure

public static AssertionError expectFailure(
    ExpectFailure.SimpleSubjectBuilderCallback<SparseBooleanArraySubjectSparseBooleanArray> callback
)

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

hasFalseValueAt

public void hasFalseValueAt(int key)

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

hasSize

public void hasSize(int size)

Assert that a SparseBooleanArray has size

hasTrueValueAt

public void hasTrueValueAt(int key)

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

isEmpty

public void isEmpty()

Assert that a SparseBooleanArray is empty

isNotEmpty

public void isNotEmpty()

Assert that a SparseBooleanArray is not empty