ResultAssertions

scalus.testing.assertions.ResultAssertions

Core assertion functions for Result.

These are framework-agnostic - they throw exceptions on failure. Test frameworks can catch these and convert to their assertion format.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def assertBudgetEquals(expectedBudget: ExUnits, result: Result): Unit

Assert that the budget equals the expected budget exactly.

Assert that the budget equals the expected budget exactly.

Attributes

def assertBudgetWithin(maxBudget: ExUnits, result: Result): Unit

Assert that the budget is within the specified limits.

Assert that the budget is within the specified limits.

Value parameters

maxBudget

Maximum allowed budget

result

The evaluation result

Attributes

Throws
BudgetAssertionError

if budget exceeds limits

def assertFailure(result: Result): Unit

Assert that the result is a failure.

Assert that the result is a failure.

Attributes

def assertFailureWith(message: String, result: Result): Unit

Assert that the result is a failure with a specific message.

Assert that the result is a failure with a specific message.

Attributes

def assertResult(expected: Expected, result: Result): Unit

Assert that the result matches the expected outcome.

Assert that the result matches the expected outcome.

Value parameters

expected

The expected outcome

result

The actual evaluation result

Attributes

Throws
AssertionError

if assertion fails

def assertSuccess(result: Result): Unit

Assert that the result is a success.

Assert that the result is a success.

Attributes

def assertTermEquals(expected: Term, result: Result): Unit

Assert that the result term equals the expected term (alpha-equivalent).

Assert that the result term equals the expected term (alpha-equivalent).

Attributes