Class Assertions
java.lang.Object
com.qaitsolutions.pframe.core.assertion.Assertions
Class is a wrapper over
Truth
.
- Since:
- 1.0
- Author:
- Iulian Andrei (iulian.andrei@qaitsolutions.com)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassertThat
(Boolean actual) Wrapper overTruth.assertThat(Boolean)
.assertThat
(Double actual) Wrapper overTruth.assertThat(Double)
.assertThat
(Float actual) Wrapper overTruth.assertThat(Float)
.assertThat
(Integer actual) Wrapper overTruth.assertThat(Integer)
.assertThat
(Iterable<?> actual) Wrapper overTruth.assertThat(Iterable)
.assertThat
(Long actual) Wrapper overTruth.assertThat(Long)
.assertThat
(Object actual) Wrapper overTruth.assertThat(Object)
.assertThat
(String actual) Wrapper overTruth.assertThat(String)
.assertThat
(BigDecimal actual) Wrapper overTruth.assertThat(BigDecimal)
.assertThat
(Map<?, ?> actual) Wrapper overTruth.assertThat(Map)
.<T extends Comparable<?>>
ComparableSubject<T> assertThat
(T actual) Wrapper overTruth.assertThat(Comparable)
.assertWithMessage
(String message) Wrapper overTruth.assertWithMessage(String)
.assertWithMessage
(String format, Object... args) Wrapper overTruth.assertWithMessage(String, Object...)
.void
fail()
Will fail (error) when used.
-
Constructor Details
-
Assertions
public Assertions()
-
-
Method Details
-
assertThat
Wrapper overTruth.assertThat(Integer)
.- Parameters:
actual
- CurrentInteger
value to be verified..- Returns:
IntegerSubject
with integer specific assertions methods.
-
assertThat
Wrapper overTruth.assertThat(Iterable)
.- Parameters:
actual
- CurrentIterable
value to be verified.- Returns:
IterableSubject
with specific assertions methods.
-
assertThat
Wrapper overTruth.assertThat(Boolean)
.- Parameters:
actual
- CurrentBoolean
value to be verified.- Returns:
BooleanSubject
with specific assertions methods.
-
assertThat
Wrapper overTruth.assertThat(Double)
.- Parameters:
actual
- CurrentDouble
value to be verified.- Returns:
DoubleSubject
with specific assertions methods.
-
assertThat
Wrapper overTruth.assertThat(Float)
.- Parameters:
actual
- CurrentFloat
value to be verified.- Returns:
DoubleSubject
with specific assertions methods.
-
assertThat
Wrapper overTruth.assertThat(Long)
.- Parameters:
actual
- CurrentLong
value to be verified.- Returns:
LongSubject
with specific assertions methods.
-
assertThat
Wrapper overTruth.assertThat(String)
.- Parameters:
actual
- CurrentString
value to be verified.- Returns:
StringSubject
with specific assertions methods.
-
assertThat
Wrapper overTruth.assertThat(Comparable)
.- Parameters:
actual
- CurrentComparable
value to be verified.- Returns:
ComparableSubject
with specific assertions methods.
-
assertThat
Wrapper overTruth.assertThat(Object)
. -
assertThat
Wrapper overTruth.assertThat(Map)
.- Parameters:
actual
- CurrentMap
value to be verified.- Returns:
MapSubject
with specific assertions methods.
-
assertThat
Wrapper overTruth.assertThat(BigDecimal)
.- Parameters:
actual
- CurrentBigDecimal
value to be verified.- Returns:
BigDecimalSubject
with specific assertions methods.
-
assertWithMessage
Wrapper overTruth.assertWithMessage(String)
.- Parameters:
message
- Text that will be added to the log/report.- Returns:
- A self reference.
-
assertWithMessage
Wrapper overTruth.assertWithMessage(String, Object...)
.- Parameters:
format
- Text that will be added to the log/report inString.format(String, Object...)
.args
- Arguments referenced by the format specifiers in the format string.- Returns:
- A self reference.
-
fail
public void fail()Will fail (error) when used. Wrapper overStandardSubjectBuilder.fail()
.- Throws:
AssertionError
- When method is used it will throw Error.
-