c41e5063b7
Removed entire kbx-foundation-v36 directory as it's been replaced by the new KBX Foundation v4 patterns implemented in this session: - Registry-driven screen definitions - Density-aware UI adapter components - Feature module templates (ShadowRun, Models) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
21 lines
609 B
C#
21 lines
609 B
C#
using System.IO.Compression;
|
|
using Xunit;
|
|
|
|
namespace Shared.Excel.Tests;
|
|
|
|
public sealed class XlsxSafetyInspectorTests
|
|
{
|
|
[Fact]
|
|
public void Rejects_zip_without_xlsx_structure()
|
|
{
|
|
using var stream = new MemoryStream();
|
|
using (var zip = new ZipArchive(stream, ZipArchiveMode.Create, true))
|
|
{
|
|
var entry = zip.CreateEntry("hello.txt");
|
|
using var writer = new StreamWriter(entry.Open());
|
|
writer.Write("not an xlsx");
|
|
}
|
|
Assert.Throws<InvalidDataException>(() => new XlsxSafetyInspector().EnsureSafe(stream.ToArray()));
|
|
}
|
|
}
|