test(app): sample card, server quota, current archive and sample report checks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
4 files changed
+139
-43
No files matched your search
@@ -240,4 +240,26 @@ public sealed class ArchiveLogicTests
|
||||
Assert.Equal("71 %", recent[0].StateText);
|
||||
Assert.Equal(JobState.Done, recent[1].State);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TheScreensWorkOnTheRememberedArchiveElseTheFirst()
|
||||
{
|
||||
var other = Main with { Id = Guid.CreateVersion7(), Name = "Travel", RootPath = "/media/travel" };
|
||||
Assert.Null(CurrentArchive.Pick([], "/archive"));
|
||||
Assert.Equal(other.Id, CurrentArchive.Pick([Main, other], "/media/travel/")!.Id);
|
||||
Assert.Equal(Main.Id, CurrentArchive.Pick([Main, other], "/elsewhere")!.Id);
|
||||
Assert.Equal(Main.Id, CurrentArchive.Pick([Main, other], null)!.Id);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TheSampleReportsFillEveryKindOfReportRow()
|
||||
{
|
||||
var locations = Enumerable.Range(1, 6).Select(i => new SequenceLocation(Guid.CreateVersion7(), $"2026/Shoot {i}", $"Shoot {i}")).ToList();
|
||||
Assert.Equal("2 copies", MaintenanceReports.Duplicates(SampleReports.Duplicates(locations), locations).Single().Detail);
|
||||
Assert.SequenceEqual(new[] { OrphanKind.UnlistedFiles, OrphanKind.MissingSequence, OrphanKind.NewFolder },
|
||||
MaintenanceReports.Orphans(SampleReports.Orphans(locations), locations).Select(o => o.Kind));
|
||||
var folders = SampleReports.Folders(locations);
|
||||
Assert.Equal(4, folders.Count(f => f.Sidecar is not null));
|
||||
Assert.Equal(2, folders.Count(f => f.Sidecar is null));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user