mirror of
https://github.com/AssetRipper/AssetRipper.git
synced 2025-12-11 20:15:29 +01:00
Replaced `Assert.Multiple` with `using (Assert.EnterMultipleScope())` in various test methods across multiple test classes. This change improves the readability and structure of assertions, allowing for better management of multiple assertions within a single test case. Affected classes include `AssetResolutionTests`, `FileResolutionTests`, `PPtrTests`, `SmartStreamTests`, and others, enhancing the organization of test result outputs.
42 lines
1.0 KiB
C#
42 lines
1.0 KiB
C#
using AssetRipper.SourceGenerated.Extensions;
|
|
|
|
namespace AssetRipper.Tests;
|
|
|
|
internal class UVInfoTests
|
|
{
|
|
[Test]
|
|
public void GetReturnsTheSetValue()
|
|
{
|
|
const int index = 0;
|
|
const bool exists = true;
|
|
const int dimension = 2;
|
|
UVInfo uvInfo = new UVInfo().AddChannelInfo(index, exists, dimension);
|
|
uvInfo.GetChannelInfo(index, out bool actualExists, out int actualDimension);
|
|
using (Assert.EnterMultipleScope())
|
|
{
|
|
Assert.That(actualExists, Is.EqualTo(exists));
|
|
Assert.That(actualDimension, Is.EqualTo(dimension));
|
|
}
|
|
}
|
|
|
|
[Test]
|
|
public void GetReturnsTheSetValues()
|
|
{
|
|
const int dimension = 2;
|
|
UVInfo uvInfo = default;
|
|
for (int i = 0; i < 8; i++)
|
|
{
|
|
uvInfo = uvInfo.AddChannelInfo(i, i % 2 == 0, dimension);
|
|
}
|
|
for (int i = 0; i < 8; i++)
|
|
{
|
|
uvInfo.GetChannelInfo(i, out bool actualExists, out int actualDimension);
|
|
using (Assert.EnterMultipleScope())
|
|
{
|
|
Assert.That(actualExists, Is.EqualTo(i % 2 == 0));
|
|
Assert.That(actualDimension, Is.EqualTo(dimension));
|
|
}
|
|
}
|
|
}
|
|
}
|