Class GraphicsTestCase
Represents one automatically-generated graphics test case.
Implements
Inherited Members
Namespace: UnityEngine.TestTools.Graphics
Assembly: UnityEngine.TestTools.Graphics.dll
Syntax
[Serializable]
public record GraphicsTestCase : IEquatable<GraphicsTestCase>
Constructors
GraphicsTestCase(string, IMethodInfo, ITest)
Creates a new GraphicsTestCase with the specified name and method. This constructor is used to create a graphics test case from a method.
Declaration
public GraphicsTestCase(string name, IMethodInfo methodInfo, ITest fixture)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the test case. This is not the full name and may not be unique. |
| IMethodInfo | methodInfo | The method information associated with this test case |
| ITest | fixture | The parent fixture of this test case. |
Properties
AdditionalReferenceImages
Gets a collection of reference images used by this test case. Enumeration breaks once the image is not found.
Declaration
public IEnumerable<ReferenceImage> AdditionalReferenceImages { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<ReferenceImage> |
FileName
The name of the Graphics Test Case converted to a valid file name. ToValidPath(string)
Declaration
public string FileName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Fixture
The parent test fixture for this test case.
Declaration
public ITest Fixture { get; set; }
Property Value
| Type | Description |
|---|---|
| ITest |
FullName
The full name of the test case, including the class name. This is used to uniquely identify the test case.
Declaration
public string FullName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IgnoreData
The ignore attributes for this test case.
Declaration
public IgnoreGraphicsTestData[] IgnoreData { get; set; }
Property Value
| Type | Description |
|---|---|
| IgnoreGraphicsTestData[] |
IgnoreReason
The reason why this test case should be ignored.
Declaration
public string IgnoreReason { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
MethodInfo
The method that this test case is generated from.
Declaration
public IMethodInfo MethodInfo { get; set; }
Property Value
| Type | Description |
|---|---|
| IMethodInfo |
Name
The name of the test case. Note that this is not the full name and may not be unique.
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ReferenceImage
Gets the reference image that this test case is compared against.
Declaration
public ReferenceImage ReferenceImage { get; set; }
Property Value
| Type | Description |
|---|---|
| ReferenceImage |
ReferenceImageDescriptor
Gets or initializes a descriptor that is used to find the reference image(s) of a graphics test case.
Declaration
public IReferenceImageFileDescriptor ReferenceImageDescriptor { get; init; }
Property Value
| Type | Description |
|---|---|
| IReferenceImageFileDescriptor |
ReferenceImagePathLog
The log message for the reference image.
Declaration
[Obsolete("Use ReferenceImage.LoadMessage instead.")]
public string ReferenceImagePathLog { get; }
Property Value
| Type | Description |
|---|---|
| string |
ShouldBeIgnored
Whether this test case should be ignored.
Declaration
public bool ShouldBeIgnored { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
TestData
The test case data connected to this Graphics Test Case.
Declaration
public TestCaseData TestData { get; set; }
Property Value
| Type | Description |
|---|---|
| TestCaseData |
Methods
ToString()
Returns a string representation of the GraphicsTestCase. This includes the full name, reference image, whether it should be ignored, and the ignore reason.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string representation of the GraphicsTestCase. |