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

Verify イベントプロセッサーでは、プロセッサーがコールされたかどうかを確認できます。

たとえば、特定のプロセッサーが、特定の属性セットを使用して、特定の回数コールされたかどうかを検証できます。

検証を定義すると、検証が成功しなかった場合にテストを失敗するよう MUnit に指示が伝えられます。

モックを作成していなくても、あらゆるプロセッサーに対して検証を定義できます。

```xml
<munit-tools:verify-call processor="http:request" atLeast="1">
   <munit-tools:with-attributes>
       <munit-tools:with-attribute attributeName="method" whereValue="#['GET']" />
   </munit-tools:with-attributes>
</munit-tools:verify-call>
```

<table class="tableblock frame-all grid-all fit-content spread">
<colgroup>
<col>
<col>
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">属性名</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>eventProcessor</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">どのイベントプロセッサーを模擬するかを説明します。この説明は ​<code>{name-space}:{event-processor-name}</code>​ の形式を使用します。正規表現をサポートします。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>times</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>(デフォルト = 1)</strong>​ イベントプロセッサーが ​<em>N</em>​ 回および ​<em>N</em>​ 回のみコールされた場合に検証が成功したとして定義します。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>atLeast</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">イベントプロセッサーのコール回数が ​<em>N</em>​ 回以上の場合に検証が成功したとして定義します。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>atMost</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">イベントプロセッサーのコール回数が ​<em>N</em>​ 回以下の場合に検証が成功したとして定義します。</p></td>
</tr>
</tbody>
</table>

属性 ​`times`​、​`atLeast`​、​`atMost`​ は相互に排他的です。

`eventProcessor`​ 属性は正規表現を受け入れます。たとえば、​`.*:request`​ と同じ検証を作成して、イベントプロセッサーが属している名前空間に関係なく、request という名前のイベントプロセッサーを検証できます。正規表現の言語は Java と同じです。

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

- [Assert That イベントプロセッサー](https://docs.mulesoft.com/jp/munit/2.3/assertion-event-processor)
- [Fail イベントプロセッサー](https://docs.mulesoft.com/jp/munit/2.3/fail-event-processor)
- [Run Custom イベントプロセッサー](https://docs.mulesoft.com/jp/munit/2.3/run-custom-event-processor)
- [Set イベントプロセッサー](https://docs.mulesoft.com/jp/munit/2.3/set-event-processor)
- [Mock When イベントプロセッサー](https://docs.mulesoft.com/jp/munit/2.3/mock-event-processor)