Files
mmd-pdf/MmdPdf.Tests/WheelPageFlipGateTests.cs
kua-agent 6610acfa44 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.
2026-08-27 07:37:09 +02:00

48 lines
1.3 KiB
C#

using MmdPdf.Services;
using Xunit;
namespace MmdPdf.Tests;
public sealed class WheelPageFlipGateTests
{
private static readonly DateTime Start = new(2026, 8, 22, 12, 0, 0, DateTimeKind.Utc);
[Fact]
public void TwoQuickNotchesAtEdge_ConfirmPageFlip()
{
var gate = new WheelPageFlipGate();
Assert.False(gate.TryConfirm(-120, Start));
Assert.True(gate.TryConfirm(-120, Start.AddMilliseconds(100)));
}
[Fact]
public void MomentumImmediatelyAfterContentScroll_DoesNotFlip()
{
var gate = new WheelPageFlipGate();
gate.NoteContentScroll(Start);
Assert.False(gate.TryConfirm(-120, Start.AddMilliseconds(50)));
Assert.False(gate.TryConfirm(-120, Start.AddMilliseconds(150)));
}
[Fact]
public void OppositeDirection_RestartsConfirmation()
{
var gate = new WheelPageFlipGate();
Assert.False(gate.TryConfirm(-120, Start));
Assert.False(gate.TryConfirm(120, Start.AddMilliseconds(100)));
Assert.True(gate.TryConfirm(120, Start.AddMilliseconds(200)));
}
[Fact]
public void SlowNotches_DoNotCombineIntoPageFlip()
{
var gate = new WheelPageFlipGate();
Assert.False(gate.TryConfirm(-120, Start));
Assert.False(gate.TryConfirm(-120, Start.AddMilliseconds(700)));
}
}