JsonAssertions

org.encalmo.lambda.JsonAssertions
object JsonAssertions extends Assertions

Attributes

Graph
Supertypes
trait Assertions
trait CompileErrorMacro
class Object
trait Matchable
class Any
Self type

Members list

Value members

Inherited methods

def assert(cond: => Boolean, clue: => Any)(implicit loc: Location): Unit

Attributes

Inherited from:
Assertions
def assertEquals[A, B](obtained: A, expected: B, clue: => Any)(implicit loc: Location, compare: Compare[A, B], diffOptions: DiffOptions): Unit

Asserts that two elements are equal according to the Compare[A, B] type-class.

Asserts that two elements are equal according to the Compare[A, B] type-class.

By default, uses == to compare values.

Attributes

Inherited from:
Assertions
def assertEqualsDouble(obtained: Double, expected: Double, delta: Double, clue: => Any)(implicit loc: Location): Unit

Asserts that two doubles are equal to within a positive delta. If the expected value is infinity then the delta value is ignored. NaNs are considered equal: assertEquals(Double.NaN, Double.NaN, *) passes.

Asserts that two doubles are equal to within a positive delta. If the expected value is infinity then the delta value is ignored. NaNs are considered equal: assertEquals(Double.NaN, Double.NaN, *) passes.

Attributes

Inherited from:
Assertions
def assertEqualsFloat(obtained: Float, expected: Float, delta: Float, clue: => Any)(implicit loc: Location): Unit

Asserts that two floats are equal to within a positive delta. If the expected value is infinity then the delta value is ignored. NaNs are considered equal: assertEquals(Float.NaN, Float.NaN, *) passes.

Asserts that two floats are equal to within a positive delta. If the expected value is infinity then the delta value is ignored. NaNs are considered equal: assertEquals(Float.NaN, Float.NaN, *) passes.

Attributes

Inherited from:
Assertions
def assertNoDiff(obtained: String, expected: String, clue: => Any)(implicit loc: Location, diffOptions: DiffOptions): Unit

Attributes

Inherited from:
Assertions
def assertNotEquals[A, B](obtained: A, expected: B, clue: => Any)(implicit loc: Location, compare: Compare[A, B]): Unit

Asserts that two elements are not equal according to the Compare[A, B] type-class.

Asserts that two elements are not equal according to the Compare[A, B] type-class.

By default, uses == to compare values.

Attributes

Inherited from:
Assertions
def assume(cond: Boolean, clue: => Any)(implicit loc: Location): Unit

Attributes

Inherited from:
Assertions
def clue[T](c: Clue[T]): T

Attributes

Inherited from:
Assertions
def clues(clue: Clue[_]*): Clues

Attributes

Inherited from:
Assertions
transparent inline def compileErrors(inline code: String): String

Attributes

Inherited from:
CompileErrorMacro
def fail(message: String, clues: Clues)(implicit loc: Location, diffOptions: DiffOptions): Nothing

Unconditionally fails this test with the given message and optional clues.

Unconditionally fails this test with the given message and optional clues.

Attributes

Inherited from:
Assertions
def fail(message: String, cause: Throwable)(implicit loc: Location, diffOptions: DiffOptions): Nothing

Unconditionally fails this test with the given message and exception marked as the cause.

Unconditionally fails this test with the given message and exception marked as the cause.

Attributes

Inherited from:
Assertions
def failComparison(message: String, obtained: Any, expected: Any, clues: Clues)(implicit loc: Location, diffOptions: DiffOptions): Nothing

Unconditionally fails this test due to result of comparing two values.

Unconditionally fails this test due to result of comparing two values.

The only reason to use this method instead of fail() is if you want to allow comparing the two different values in the the IntelliJ GUI diff viewer.

Attributes

Inherited from:
Assertions
def failSuite(message: String, clues: Clues)(implicit loc: Location, diffOptions: DiffOptions): Nothing

Unconditionally fail this test case and cancel all the subsequent tests in this suite.

Unconditionally fail this test case and cancel all the subsequent tests in this suite.

Attributes

Inherited from:
Assertions
def intercept[T <: Throwable](body: => Any)(implicit T: ClassTag[T], loc: Location): T

Evalutes the given expression and asserts that an exception of type T is thrown.

Evalutes the given expression and asserts that an exception of type T is thrown.

Attributes

Inherited from:
Assertions
def interceptMessage[T <: Throwable](expectedExceptionMessage: String)(body: => Any)(implicit T: ClassTag[T], loc: Location): T

Evalutes the given expression and asserts that an exception of type T with the expected message is thrown.

Evalutes the given expression and asserts that an exception of type T with the expected message is thrown.

Attributes

Inherited from:
Assertions

Attributes

Inherited from:
Assertions
def munitCaptureClues[T](thunk: => T): (T, Clues)

Attributes

Inherited from:
Assertions
def munitPrint(clue: => Any): String

Attributes

Inherited from:
Assertions
def printer: Printer

Attributes

Inherited from:
Assertions

Inherited fields

val munitLines: Lines

Attributes

Inherited from:
Assertions

Extensions

Extensions

extension (value: Value)
final def assertBigDecimalAt(path: String)(expected: BigDecimal)(using Location): Value
final def assertBigDecimalAt2(path: String)(check: BigDecimal => Boolean)(using Location): Value
final def assertBigDecimalExistsAt(path: String)(using Location): Value
final def assertBooleanAt(path: String)(expected: Boolean)(using Location): Value
final def assertBooleanExistsAt(path: String)(using Location): Value
final def assertDoubleAt(path: String)(expected: Double)(using Location): Value
final def assertDoubleExistsAt(path: String)(using Location): Value
final def assertFalseAt(path: String)(using Location): Value
final def assertIntAt(path: String)(expected: Int)(using Location): Value
final def assertIntExistsAt(path: String)(using Location): Value
final def assertIntStringAt(path: String)(expected: Int)(using Location): Value
final def assertObjectAt(path: String)(check: Obj => Unit)(using Location): Value
final def assertObjectExistsAt(path: String)(using Location): Value
final def assertObjectIfExistsAt(path: String)(check: Obj => Unit)(using Location): Value
final def assertStringAt(path: String)(expected: String)(using Location): Value
final def assertStringAt(path: String)(check: String => Boolean)(using Location): Value
final def assertStringExistsAt(path: String)(using Location): Value
final def assertTrueAt(path: String)(using Location): Value
final def getBigDecimalAt(path: String)(using Location): BigDecimal
final def getBooleanAt(path: String)(using Location): Boolean
final def getDoubleAt(path: String)(using Location): Double
final def getIntAt(path: String)(using Location): Int
final def getStringAt(path: String)(using Location): String
final def getStringOrIntAt(path: String)(using Location): Int