Class ComparisonResultMessage
A player-to-host message carrying the thresholds (expected) and measured values (actual) of a single image comparison, sent for every comparison whether it passed or failed.
Inherited Members
Namespace: UnityEngine.TestTools.Graphics
Assembly: UnityEngine.TestTools.Graphics.dll
Syntax
public class ComparisonResultMessage
Properties
ActualJson
The measured values as a JSON object, with keys specific to Algorithm.
Declaration
public string ActualJson { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Algorithm
The type name of the TextureComparisonAlgorithm that produced the values.
Declaration
public string Algorithm { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ExpectedJson
The configured thresholds as a JSON object, with keys specific to Algorithm.
Declaration
public string ExpectedJson { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ImageName
The name identifying the compared image, if one was configured.
Declaration
public string ImageName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
MessageId
The message ID for the comparison result message. This is used to identify the message type.
Declaration
public static Guid MessageId { get; }
Property Value
| Type | Description |
|---|---|
| Guid |
Success
Whether the comparison passed its thresholds.
Declaration
public bool Success { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
TestName
The full name of the NUnit test the comparison ran in, or null when the comparison ran outside a test.
Declaration
public string TestName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Deserialize(byte[])
Deserializes a byte array produced by Serialize().
Declaration
public static ComparisonResultMessage Deserialize(byte[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | data | The serialized byte array. |
Returns
| Type | Description |
|---|---|
| ComparisonResultMessage | The deserialized message. |
Serialize()
Serializes the message to a byte array.
Declaration
public byte[] Serialize()
Returns
| Type | Description |
|---|---|
| byte[] | The serialized byte array representation of the message. |