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

Public methods

assertThat

public static SparseBooleanArraySubjectassertThat(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 AssertionErrorexpectFailure(
ExpectFailure.SimpleSubjectBuilderCallback<SparseBooleanArraySubject, SparseBooleanArray> 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