ComparisonFailException

munit.ComparisonFailException
class ComparisonFailException(val message: String, val obtained: Any, val obtainedString: String, val expected: Any, val expectedString: String, val location: Location, val isStackTracesEnabled: Boolean) extends ComparisonFailure, FailExceptionLike[ComparisonFailException]

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 parameters

expected

the expected value from this comparison.

expectedString

the pretty-printed representation of the obtained value. This string is displayed in the IntelliJ diff viewer.

location

the source location where this exception was thrown.

message

the exception message.

obtained

the obtained value from this comparison.

obtainedString

the pretty-printed representation of the obtained value. This string is displayed in the IntelliJ diff viewer.

Attributes

Graph
Supertypes
class ComparisonFailure
class AssertionError
class Error
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Members list

Value members

Constructors

def this(message: String, obtained: Any, expected: Any, location: Location, isStackTracesEnabled: Boolean)

Concrete methods

override def fillInStackTrace(): Throwable

Attributes

Definition Classes
Throwable
override def getMessage: String

Attributes

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

Inherited methods

final def addSuppressed(x$0: Throwable): Unit

Attributes

Inherited from:
Throwable
def getActual(): String

Attributes

Inherited from:
ComparisonFailure
def getCause(): Throwable

Attributes

Inherited from:
Throwable
def getExpected(): String

Attributes

Inherited from:
ComparisonFailure
def getLocalizedMessage(): String

Attributes

Inherited from:
Throwable
def getStackTrace(): Array[StackTraceElement]

Attributes

Inherited from:
Throwable
final def getSuppressed(): Array[Throwable]

Attributes

Inherited from:
Throwable
def initCause(x$0: Throwable): Throwable

Attributes

Inherited from:
Throwable
def printStackTrace(x$0: PrintWriter): Unit

Attributes

Inherited from:
Throwable
def printStackTrace(x$0: PrintStream): Unit

Attributes

Inherited from:
Throwable
def printStackTrace(): Unit

Attributes

Inherited from:
Throwable
def setStackTrace(x$0: Array[StackTraceElement]): Unit

Attributes

Inherited from:
Throwable
def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Inherited from:
Throwable

Concrete fields

val expected: Any
val expectedString: String
val isStackTracesEnabled: Boolean
val message: String
val obtained: Any
val obtainedString: String