mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-09-14 23:43:37 +00:00
26 lines
1.0 KiB
C#
26 lines
1.0 KiB
C#
|
|
using AIStudio.Tests.Models.Corpus;
|
||
|
|
|
||
|
|
namespace AIStudio.Tests.Models;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Writes the capability snapshot anew.
|
||
|
|
/// </summary>
|
||
|
|
/// <remarks>
|
||
|
|
/// Marked explicit, so it never runs as part of the suite: it would make the characterization test
|
||
|
|
/// pass by rewriting what that test compares against. Run it by hand, from the IDE or with
|
||
|
|
/// "dotnet test --filter TakeTheSnapshotAnew", once a diff has been read and accepted, and commit
|
||
|
|
/// the new file together with the change which caused it.
|
||
|
|
/// </remarks>
|
||
|
|
[TestFixture]
|
||
|
|
[Explicit("Rewrites the file the characterization test compares against. Run it only after reading the diff.")]
|
||
|
|
public sealed class SnapshotWriterTests
|
||
|
|
{
|
||
|
|
[Test]
|
||
|
|
public void TakeTheSnapshotAnew()
|
||
|
|
{
|
||
|
|
File.WriteAllText(CapabilitySnapshot.FILE_PATH, CapabilitySnapshot.Render(ModelCorpus.ENTRIES));
|
||
|
|
File.Delete(CapabilitySnapshot.ACTUAL_FILE_PATH);
|
||
|
|
|
||
|
|
TestContext.Out.WriteLine($"Wrote {CapabilitySnapshot.FILE_PATH}. Read the diff before committing it.");
|
||
|
|
}
|
||
|
|
}
|