ComparisonFailException

class ComparisonFailException(val message: String, val obtained: Any, val expected: Any, val location: Location) extends ComparisonFailure with FailExceptionLike[ComparisonFailException]

The base exception for all comparison failures.

The base exception for all comparison failures.

This class exists so that it can extend org.junit.ComparisonFailure, which is recognised by IntelliJ so that users can optionally compare the obtained/expected values in a GUI diff explorer.

Value Params
expected

the expected value from this comparison.

location

the source location where this exception was thrown.

message

the exception message.

obtained

the obtained value from this comparison.

class ComparisonFailure
class AssertionError
class Error
class Throwable
trait Serializable
class Object
trait Matchable
class Any

Value members

Concrete methods

override def getMessage: String
Definition Classes
ComparisonFailure -> Throwable
def withMessage(newMessage: String): ComparisonFailException

Inherited methods

final def addSuppressed(`x$0`: Throwable): Unit
Inherited from
Throwable
def fillInStackTrace(): Throwable
Inherited from
Throwable
def getActual(): String
Inherited from
ComparisonFailure
def getCause(): Throwable
Inherited from
Throwable
def getExpected(): String
Inherited from
ComparisonFailure
def getLocalizedMessage(): String
Inherited from
Throwable
def getStackTrace(): Array[StackTraceElement]
Inherited from
Throwable
final def getSuppressed(): Array[Throwable]
Inherited from
Throwable
def initCause(`x$0`: Throwable): Throwable
Inherited from
Throwable
def printStackTrace(`x$0`: PrintWriter): Unit
Inherited from
Throwable
def printStackTrace(`x$0`: PrintStream): Unit
Inherited from
Throwable
def printStackTrace(): Unit
Inherited from
Throwable
def setStackTrace(`x$0`: Array[StackTraceElement]): Unit
Inherited from
Throwable
def toString(): String
Inherited from
Throwable

Concrete fields

val expected: Any
val message: String
val obtained: Any