Contents

expect

A callable that creates an entity expectation from value expectations for the entity’s properties.

Declaration

var expect: IntentValueExpectationCallable<any IntentValueExpectation, AppEntityExpectation> { get }

Discussion

Call expect with a labeled argument for each property you want to check. Each label names a property, and each argument is the value expectation for it. The expectation doesn’t check properties you omit or pass nil for. Pass isNil to expect a property to be absent. For example:

let expectation = eventEntityDefinition.expect(
    title: .contains("NASA"),
    endDate: .isNil
)