# Summary

Class: | WireMock.Matchers.ExactObjectMatcher
Assembly: | WireMock.Net
File(s): | C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Matchers\ExactObjectMatcher.cs
Covered lines: | 24
Uncovered lines: | 0
Coverable lines: | 24
Total lines: | 71
Line coverage: | 100%
Branch coverage: | 100%

# Metrics

Method | Cyclomatic complexity | NPath complexity | Sequence coverage | Branch coverage
--- | --- | --- | --- | ---
IsMatch(...) | 0 | 0 | 1 | 1
.ctor(...) | 0 | 0 | 1 | 0
.ctor(...) | 0 | 0 | 1 | 0
.ctor(...) | 0 | 0 | 1 | 0
.ctor(...) | 0 | 0 | 1 | 0

# File(s)

## C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Matchers\ExactObjectMatcher.cs

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `using System.Linq;`
|  | `2` |  | `using JetBrains.Annotations;`
|  | `3` |  | `using WireMock.Validation;`
|  | `4` |  | ``
|  | `5` |  | `namespace WireMock.Matchers`
|  | `6` |  | `{`
|  | `7` |  | `/// <summary>`
|  | `8` |  | `/// ExactObjectMatcher`
|  | `9` |  | `/// </summary>`
|  | `10` |  | `/// <seealso cref="IObjectMatcher" />`
|  | `11` |  | `public class ExactObjectMatcher : IObjectMatcher`
|  | `12` |  | `{`
|  | `13` |  | `private readonly object _object;`
|  | `14` |  | `private readonly byte[] _bytes;`
|  | `15` |  | ``
|  | `16` |  | `/// <inheritdoc cref="IMatcher.MatchBehaviour"/>`
| 5 | `17` |  | `public MatchBehaviour MatchBehaviour { get; }`
|  | `18` |  | ``
|  | `19` |  | `/// <summary>`
|  | `20` |  | `/// Initializes a new instance of the <see cref="ExactObjectMatcher"/> class.`
|  | `21` |  | `/// </summary>`
|  | `22` |  | `/// <param name="value">The value.</param>`
| 2 | `23` |  | `public ExactObjectMatcher([NotNull] object value) : this(MatchBehaviour.AcceptOnMatch, value)`
| 2 | `24` |  | `{`
| 2 | `25` |  | `}`
|  | `26` |  | ``
|  | `27` |  | `/// <summary>`
|  | `28` |  | `/// Initializes a new instance of the <see cref="ExactObjectMatcher"/> class.`
|  | `29` |  | `/// </summary>`
|  | `30` |  | `/// <param name="matchBehaviour">The match behaviour.</param>`
|  | `31` |  | `/// <param name="value">The value.</param>`
| 4 | `32` |  | `public ExactObjectMatcher(MatchBehaviour matchBehaviour, [NotNull] object value)`
| 4 | `33` |  | `{`
| 4 | `34` |  | `Check.NotNull(value, nameof(value));`
|  | `35` |  | ``
| 4 | `36` |  | `_object = value;`
| 4 | `37` |  | `MatchBehaviour = matchBehaviour;`
| 4 | `38` |  | `}`
|  | `39` |  | ``
|  | `40` |  | `/// <summary>`
|  | `41` |  | `/// Initializes a new instance of the <see cref="ExactObjectMatcher"/> class.`
|  | `42` |  | `/// </summary>`
|  | `43` |  | `/// <param name="value">The value.</param>`
| 1 | `44` |  | `public ExactObjectMatcher([NotNull] byte[] value) : this(MatchBehaviour.AcceptOnMatch, value)`
| 1 | `45` |  | `{`
| 1 | `46` |  | `}`
|  | `47` |  | ``
|  | `48` |  | `/// <summary>`
|  | `49` |  | `/// Initializes a new instance of the <see cref="ExactObjectMatcher"/> class.`
|  | `50` |  | `/// </summary>`
|  | `51` |  | `/// <param name="matchBehaviour">The match behaviour.</param>`
|  | `52` |  | `/// <param name="value">The value.</param>`
| 2 | `53` |  | `public ExactObjectMatcher(MatchBehaviour matchBehaviour, [NotNull] byte[] value)`
| 2 | `54` |  | `{`
| 2 | `55` |  | `Check.NotNull(value, nameof(value));`
|  | `56` |  | ``
| 2 | `57` |  | `_bytes = value;`
| 2 | `58` |  | `MatchBehaviour = matchBehaviour;`
| 2 | `59` |  | `}`
|  | `60` |  | ``
|  | `61` |  | `/// <inheritdoc cref="IObjectMatcher.IsMatch"/>`
|  | `62` |  | `public double IsMatch(object input)`
| 5 | `63` |  | `{`
| 5 | `64` |  | `bool equals = _object != null ? Equals(_object, input) : _bytes.SequenceEqual((byte[])input);`
| 5 | `65` |  | `return MatchBehaviourHelper.Convert(MatchBehaviour, MatchScores.ToScore(equals));`
| 5 | `66` |  | `}`
|  | `67` |  | ``
|  | `68` |  | `/// <inheritdoc cref="IMatcher.Name"/>`
| 1 | `69` |  | `public string Name => "ExactObjectMatcher";`
|  | `70` |  | `}`
|  | `71` |  | `}`

# Methods/Properties

MatchBehaviour()
.ctor(System.Object)
.ctor(WireMock.Matchers.MatchBehaviour,System.Object)
.ctor(System.Byte[])
.ctor(WireMock.Matchers.MatchBehaviour,System.Byte[])
IsMatch(System.Object)
Name()