Bring the Video tab closer to Shorts with 4K preview stills and crop modes (none, auto, center, plus the visual editor). Settings store a default source folder so Find videos can collect output.avi sequences. Cap the FFmpeg log with auto-scroll, hide repeat spam, and show a Windows notification when a video or short finishes or fails.
68 lines
1.8 KiB
C#
68 lines
1.8 KiB
C#
using AmiReel.Services;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
|
|
namespace AmiReel.Tests.Services;
|
|
|
|
[TestClass]
|
|
public class RenderNotifierTests
|
|
{
|
|
[TestMethod]
|
|
public void DescribeCompleted_ForVideo_UsesRenderCompleteCopy()
|
|
{
|
|
// Act
|
|
(string title, string body) = RenderNotifier.DescribeCompleted(shorts: false);
|
|
|
|
// Assert
|
|
Assert.AreEqual("Render complete", title);
|
|
StringAssert.Contains(body, "successfully");
|
|
}
|
|
|
|
[TestMethod]
|
|
public void DescribeCompleted_ForShorts_UsesShortCompleteCopy()
|
|
{
|
|
// Act
|
|
(string title, string body) = RenderNotifier.DescribeCompleted(shorts: true);
|
|
|
|
// Assert
|
|
Assert.AreEqual("Short complete", title);
|
|
StringAssert.Contains(body, "Short");
|
|
}
|
|
|
|
[TestMethod]
|
|
public void DescribeFailed_WithBlankSummary_UsesFallbackBody()
|
|
{
|
|
// Act
|
|
(string title, string body) = RenderNotifier.DescribeFailed(" ");
|
|
|
|
// Assert
|
|
Assert.AreEqual("Render failed", title);
|
|
Assert.AreEqual("The render failed.", body);
|
|
}
|
|
|
|
[TestMethod]
|
|
public void DescribeFailed_WithLongSummary_TruncatesBody()
|
|
{
|
|
// Arrange
|
|
string summary = new('x', 250);
|
|
|
|
// Act
|
|
(string title, string body) = RenderNotifier.DescribeFailed(summary);
|
|
|
|
// Assert
|
|
Assert.AreEqual("Render failed", title);
|
|
Assert.AreEqual(180, body.Length);
|
|
StringAssert.EndsWith(body, "...");
|
|
}
|
|
|
|
[TestMethod]
|
|
public void DescribeCancelled_ReturnsCancelledCopy()
|
|
{
|
|
// Act
|
|
(string title, string body) = RenderNotifier.DescribeCancelled();
|
|
|
|
// Assert
|
|
Assert.AreEqual("Render cancelled", title);
|
|
StringAssert.Contains(body, "cancelled");
|
|
}
|
|
}
|