Package com.google.common.truth
Class TableSubject
- java.lang.Object
-
- com.google.common.truth.Subject
-
- com.google.common.truth.TableSubject
-
public final class TableSubject extends Subject
Propositions forTable
subjects.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.truth.Subject
Subject.EqualityCheck, Subject.Factory<SubjectT extends Subject,ActualT>
-
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.collect.Table<?,?,?>
actual
-
Constructor Summary
Constructors Constructor Description TableSubject(FailureMetadata metadata, com.google.common.collect.Table<?,?,?> table)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contains(java.lang.Object rowKey, java.lang.Object columnKey)
Fails if the table does not contain a mapping for the given row key and column key.void
containsCell(com.google.common.collect.Table.Cell<?,?,?> cell)
Fails if the table does not contain the given cell.void
containsCell(java.lang.Object rowKey, java.lang.Object colKey, java.lang.Object value)
Fails if the table does not contain the given cell.void
containsColumn(java.lang.Object columnKey)
Fails if the table does not contain the given column key.void
containsRow(java.lang.Object rowKey)
Fails if the table does not contain the given row key.void
containsValue(java.lang.Object value)
Fails if the table does not contain the given value.void
doesNotContain(java.lang.Object rowKey, java.lang.Object columnKey)
Fails if the table contains a mapping for the given row key and column key.void
doesNotContainCell(com.google.common.collect.Table.Cell<?,?,?> cell)
Fails if the table contains the given cell.void
doesNotContainCell(java.lang.Object rowKey, java.lang.Object colKey, java.lang.Object value)
Fails if the table contains the given cell.void
hasSize(int expectedSize)
Fails if the table does not have the given size.void
isEmpty()
Fails if the table is not empty.void
isNotEmpty()
Fails if the table is empty.-
Methods inherited from class com.google.common.truth.Subject
actual, actualCustomStringRepresentation, actualCustomStringRepresentationForPackageMembersToCall, butWas, check, check, checkNoNeedToDisplayBothValues, equals, fail, fail, fail, failEqualityCheckForEqualsWithoutDescription, failWithActual, failWithActual, failWithActual, failWithActual, failWithBadResults, failWithCustomSubject, failWithoutActual, failWithoutActual, failWithoutActual, failWithoutActual, failWithoutSubject, hashCode, ignoreCheck, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameInstanceAs, isNull, isSameInstanceAs, toString, typeDescription
-
-
-
-
Constructor Detail
-
TableSubject
TableSubject(FailureMetadata metadata, com.google.common.collect.Table<?,?,?> table)
-
-
Method Detail
-
isEmpty
public void isEmpty()
Fails if the table is not empty.
-
isNotEmpty
public void isNotEmpty()
Fails if the table is empty.
-
hasSize
public final void hasSize(int expectedSize)
Fails if the table does not have the given size.
-
contains
public void contains(java.lang.Object rowKey, java.lang.Object columnKey)
Fails if the table does not contain a mapping for the given row key and column key.
-
doesNotContain
public void doesNotContain(java.lang.Object rowKey, java.lang.Object columnKey)
Fails if the table contains a mapping for the given row key and column key.
-
containsCell
public void containsCell(java.lang.Object rowKey, java.lang.Object colKey, java.lang.Object value)
Fails if the table does not contain the given cell.
-
containsCell
public void containsCell(com.google.common.collect.Table.Cell<?,?,?> cell)
Fails if the table does not contain the given cell.
-
doesNotContainCell
public void doesNotContainCell(java.lang.Object rowKey, java.lang.Object colKey, java.lang.Object value)
Fails if the table contains the given cell.
-
doesNotContainCell
public void doesNotContainCell(com.google.common.collect.Table.Cell<?,?,?> cell)
Fails if the table contains the given cell.
-
containsRow
public void containsRow(java.lang.Object rowKey)
Fails if the table does not contain the given row key.
-
containsColumn
public void containsColumn(java.lang.Object columnKey)
Fails if the table does not contain the given column key.
-
containsValue
public void containsValue(java.lang.Object value)
Fails if the table does not contain the given value.
-
-