---
schema_version: "1"
id: d7bcc3a384c20e126aa28a87ebf8b03ec27c7e2ddc2c0fad810c5c30cc07f57f
title: Assert That イベントプロセッサー
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/munit/2.3/assertion-event-processor.md
canonical_url: https://docs.mulesoft.com/jp/munit/2.3/assertion-event-processor
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 91dfaf4b78205bd7d91f54a6388d37f878b4a42a6905f6f297a1d7c448a84d22
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
# Assert That イベントプロセッサー

Assert That イベントプロセッサーでは、Mule イベントのコンテンツの状態を検証するためにアサーションを実行できます。Assert That プロセッサーを使用して、本番コードの実行後に Mule イベントを検証できます。

Assert That プロセッサーは、​`MUnit matchers`​ という一連の DataWeave 機能を使用して、式の任意の値のアサーション条件を定義します。

たとえば、ペイロードが特定の値と等しいことをアサートするため、​`equalTo()`​ マッチャーを使用して AssertThat プロセッサーを設定します。

```xml
<munit-tools:assert-that
  expression="#[payload]"
  is="#[MunitTools::equalTo('example')]"
  message="The payload should be ‘example’"/>
```

または、​`nullValue()`​ マッチャーを使用してペイロードが null かどうかを確認することもできます。

```xml
<munit-tools:assert-that
  expression="#[payload]"
  is="#[MunitTools::nullValue()]"
  message="The payload should be null"/>
```

詳細は​[「MUnit マッチャー」](https://docs.mulesoft.com/jp/munit/2.3/munit-matchers)​を参照してください。

これらのアサーションが失敗すると、プロセッサーは ​`java.lang.AssertionError`​ をスローします。

## [](#関連情報)関連情報

- [MUnit マッチャー](https://docs.mulesoft.com/jp/munit/2.3/munit-matchers)