feat(ads/seo/release): v1.2.0 with live Google Ads, isolated ad profile, ads.txt, and SEO/AEO/GEO optimization
This commit is contained in:
parent
a88aafa1e5
commit
0e568f1f0a
975 changed files with 130593 additions and 16783 deletions
58
tests/Paca.Tests/Core/VideoSpriteSheetGeneratorGateTests.cs
Normal file
58
tests/Paca.Tests/Core/VideoSpriteSheetGeneratorGateTests.cs
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using Paca.Core;
|
||||
using Xunit;
|
||||
|
||||
namespace Paca.Tests.Core;
|
||||
|
||||
public class VideoSpriteSheetGeneratorGateTests
|
||||
{
|
||||
[Fact]
|
||||
public void Gate325_VideoSpriteSheetGenerator_ConfigComputesDimensions_Accurately()
|
||||
{
|
||||
var config = new SpriteSheetConfig(Columns: 5, Rows: 5, ThumbWidth: 160, ThumbHeight: 90, IntervalSec: 5);
|
||||
|
||||
Assert.Equal(25, config.TotalTilesPerSheet);
|
||||
Assert.Equal(800, config.SheetWidth); // 5 * 160
|
||||
Assert.Equal(450, config.SheetHeight); // 5 * 90
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Gate326_VideoSpriteSheetGenerator_BuildsFfmpegFilterArgs_Correctly()
|
||||
{
|
||||
var config = new SpriteSheetConfig(5, 5, 160, 90, 10);
|
||||
var cmd = VideoSpriteSheetGenerator.BuildFfmpegSpriteCommandLine("C:\\vid.mp4", "C:\\sprite.jpg", config);
|
||||
|
||||
Assert.Contains("-i \"C:\\vid.mp4\"", cmd);
|
||||
Assert.Contains("-vf \"fps=1/10,scale=160:90,tile=5x5\"", cmd);
|
||||
Assert.Contains("-frames:v 1", cmd);
|
||||
Assert.EndsWith("\"C:\\sprite.jpg\" -y", cmd);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Gate327_VideoSpriteSheetGenerator_GeneratesValidWebVttHeaderAndTimestamps()
|
||||
{
|
||||
var config = new SpriteSheetConfig(5, 5, 160, 90, 5);
|
||||
var vtt = VideoSpriteSheetGenerator.GenerateVttMapping("sprite.jpg", totalDurationSec: 25.0, config);
|
||||
|
||||
Assert.StartsWith("WEBVTT", vtt.TrimStart());
|
||||
Assert.Contains("00:00:00.000 --> 00:00:05.000", vtt);
|
||||
Assert.Contains("00:00:05.000 --> 00:00:10.000", vtt);
|
||||
Assert.Contains("00:00:20.000 --> 00:00:25.000", vtt);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Gate328_VideoSpriteSheetGenerator_CalculatesGridCoordinatesAndLineBreaks()
|
||||
{
|
||||
var config = new SpriteSheetConfig(Columns: 3, Rows: 3, ThumbWidth: 100, ThumbHeight: 50, IntervalSec: 1);
|
||||
var vtt = VideoSpriteSheetGenerator.GenerateVttMapping("sheet.jpg", totalDurationSec: 5.0, config);
|
||||
|
||||
// Tile 0: row 0, col 0 -> 0,0,100,50
|
||||
Assert.Contains("sheet.jpg#xywh=0,0,100,50", vtt);
|
||||
// Tile 1: row 0, col 1 -> 100,0,100,50
|
||||
Assert.Contains("sheet.jpg#xywh=100,0,100,50", vtt);
|
||||
// Tile 2: row 0, col 2 -> 200,0,100,50
|
||||
Assert.Contains("sheet.jpg#xywh=200,0,100,50", vtt);
|
||||
// Tile 3: row 1, col 0 -> 0,50,100,50 (wrapped down to row 1)
|
||||
Assert.Contains("sheet.jpg#xywh=0,50,100,50", vtt);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue