---
title: assertForOverFulfill
framework: XCTest
role: symbol
role_heading: Instance Property
platforms: []
path: xctest/xctestexpectation/2806575-assertforoverfulfill
---

# assertForOverFulfill

Indicates that an assertion should be triggered during testing if the expectation is over-fulfilled.

## Declaration

```swift
var assertForOverFulfill: Bool { get set }
```

## Discussion

When [true](../../swift/true.md), a call to [fulfill()](fulfill().md) made after the expectation has already been fulfilled (exceeding [expectedFulfillmentCount](expectedfulfillmentcount.md)) will trigger an assertion. When [false](../../swift/false.md), a call to [fulfill()](fulfill().md) after the expectation has already been fulfilled will have no effect.

The [assertForOverFulfill](assertforoverfulfill.md) property is set to [false](../../swift/false.md) by default for expectations created directly from initializers on [XCTestExpectation](../xctestexpectation.md) and its subclasses.

The [assertForOverFulfill](assertforoverfulfill.md) property is set to [true](../../swift/true.md) by default for expectations created with the following [XCTestCase](../xctestcase.md) convenience methods:

- [expectation(description:)](../xctestcase/expectation(description:).md)
- [expectation(for:evaluatedWith:handler:)](../xctestcase/expectation(for:evaluatedwith:handler:).md)
- [expectation(forNotification:object:handler:)](../xctestcase/expectation(fornotification:object:handler:).md)
- [keyValueObservingExpectation(for:keyPath:expectedValue:)](../xctestcase/keyvalueobservingexpectation(for:keypath:expectedvalue:).md)
- [keyValueObservingExpectation(for:keyPath:handler:)](../xctestcase/keyvalueobservingexpectation(for:keypath:handler:).md)

## See Also

### Fulfillment Count

- [expectedFulfillmentCount](expectedfulfillmentcount.md)
