mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-15 14:52:35 +02:00
This massively reduces the file count of published SS14 builds by a few thousand, by combining YAML prototypes and Fluent files in the same folder into one file.
29 lines
825 B
C#
29 lines
825 B
C#
using NUnit.Framework;
|
|
using Robust.Packaging.AssetProcessing;
|
|
|
|
namespace Robust.UnitTesting.Packaging;
|
|
|
|
/// <summary>
|
|
/// Helper class for testing <see cref="AssetPass"/>.
|
|
/// </summary>
|
|
public static class AssetPassTest
|
|
{
|
|
/// <summary>
|
|
/// Make an asset pass write into a <see cref="AssetPassTestCollector"/> and resolve the graph.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// The resolved graph logs to the NUnit test context.
|
|
/// </remarks>
|
|
public static AssetPassTestCollector SetupTestPass(AssetPass testedPass)
|
|
{
|
|
var logger = new PackageLoggerNUnit(TestContext.Out);
|
|
var collectorPass = new AssetPassTestCollector();
|
|
|
|
collectorPass.AddDependency(testedPass);
|
|
|
|
AssetGraph.CalculateGraph([testedPass, collectorPass], logger);
|
|
|
|
return collectorPass;
|
|
}
|
|
}
|