---
schema_version: "1"
id: 12182aa22635d6f07c759b8d5206651d399e38664a59df3acda8b2facd80639c
title: Assert That イベントプロセッサー
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/munit/3.0/assertion-event-processor.md
canonical_url: https://docs.mulesoft.com/jp/munit/3.0/assertion-event-processor
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 45aa7d6dae13e10c3170bc8da3e6cf45fd79ca4431c29d18537079c60798c53f
description: MuleSoft Documentation Site
release: "3.0"
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/3.0/munit-matchers)​を参照してください。

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

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

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