feat: rebrand to MMD PDF, single corporate theme, and remove original text under an edit
- Services/PdfRedactText.cs: strip text whose origin falls inside a CoverAnnotation from the page content stream at save time, hooked into PdfBurn.DrawAnnotationsIntoDoc. Fixes edited values staying recoverable by text extraction. - Themes/MMD.xaml replaces all thirteen themes; picker and accent strip removed; no dark mode. - Rename KillerPDF -> MMD PDF across code, resources, packaging and locale strings; new icon. - Remove the upstream author credit and the in-app install button.
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
using MmdPdf.Services;
|
||||
using Xunit;
|
||||
|
||||
namespace MmdPdf.Tests
|
||||
{
|
||||
public class SignatureStoreTests
|
||||
{
|
||||
[Fact]
|
||||
public void NewStore_HasEmptySignatures()
|
||||
{
|
||||
var store = new SignatureStore();
|
||||
Assert.Empty(store.Signatures);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Add_IncreasesCount()
|
||||
{
|
||||
var store = new SignatureStore();
|
||||
store.Add(new SavedSignature { Name = "Test" });
|
||||
Assert.Single(store.Signatures);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Remove_DecreasesCount()
|
||||
{
|
||||
var store = new SignatureStore();
|
||||
var sig = new SavedSignature { Name = "Test" };
|
||||
store.Add(sig);
|
||||
store.Remove(sig);
|
||||
Assert.Empty(store.Signatures);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RoundTrip_PersistAndLoad()
|
||||
{
|
||||
var dir = System.IO.Path.Combine(System.IO.Path.GetTempPath(), Guid.NewGuid().ToString("N"));
|
||||
System.IO.Directory.CreateDirectory(dir);
|
||||
var file = System.IO.Path.Combine(dir, "sig_test.json");
|
||||
|
||||
try
|
||||
{
|
||||
var store1 = new SignatureStore(dir, file);
|
||||
store1.Add(new SavedSignature { Name = "Alpha", CanvasWidth = 400, CanvasHeight = 150 });
|
||||
store1.Add(new SavedSignature { Name = "Beta", CanvasWidth = 300, CanvasHeight = 100 });
|
||||
store1.Persist();
|
||||
|
||||
var store2 = new SignatureStore(dir, file);
|
||||
store2.Load();
|
||||
|
||||
Assert.Equal(2, store2.Signatures.Count);
|
||||
Assert.Equal("Alpha", store2.Signatures[0].Name);
|
||||
Assert.Equal("Beta", store2.Signatures[1].Name);
|
||||
}
|
||||
finally
|
||||
{
|
||||
System.IO.Directory.Delete(dir, recursive: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user