public async Task AcceptAllMultiple() { await using var tracker = new RecordingTracker(); tracker.AddDelete(file1); tracker.AddDelete(file2); tracker.AcceptAll(); tracker.AssertEmpty(); }
public async Task AddSame() { await using var tracker = new RecordingTracker(); tracker.AddDelete(file1); tracker.AddDelete(file1); Assert.Equal(1, tracker.Deletes.Count); Assert.True(tracker.TrackingAny); }
public void AddSame() { var tracker = new RecordingTracker(); tracker.AddDelete(file1); tracker.AddDelete(file1); Assert.Equal(1, tracker.Deletes.Count); Assert.True(tracker.TrackingAny); }
public async Task AcceptSingle_NotEmpty() { await using var tracker = new RecordingTracker(); var tracked = tracker.AddDelete(file1); tracker.AddDelete(file2); tracker.Accept(tracked); Assert.Equal(1, tracker.Deletes.Count); Assert.True(tracker.TrackingAny); }
public async Task FullGrouped() { await using var tracker = new RecordingTracker(); tracker.AddDelete(file1); tracker.AddDelete("file2.txt"); tracker.AddMove(file3, file3, "theExe", "theArguments", true, null); tracker.AddMove(file4, "file4.txt", "theExe", "theArguments", true, null); var menu = MenuBuilder.Build(() => { }, () => { }, tracker); await Verifier.Verify(menu, settings); }
public async Task Full() { await using var tracker = new RecordingTracker(); tracker.AddDelete(file1); tracker.AddDelete(file2); tracker.AddMove(file3, file3, "theExe", "theArguments", true, null); tracker.AddMove(file4, file4, "theExe", "theArguments", true, null); var menu = new ContextMenuStrip(); MenuBuilder.Build(menu, () => { }, () => { }, tracker); await Verifier.Verify(menu, settings); }
public async Task OnlyDelete() { await using var tracker = new RecordingTracker(); tracker.AddDelete(file1); var menu = MenuBuilder.Build(() => { }, () => { }, tracker); await Verifier.Verify(menu, settings); }
public async Task Simple() { await using var tracker = new RecordingTracker(); tracker.AddDelete(file1); tracker.AddMove(file2, file2, "theExe", "theArguments", true, null); tracker.Clear(); tracker.AssertEmpty(); }
public async Task AcceptSingle() { await using var tracker = new RecordingTracker(); var tracked = tracker.AddDelete(file1); tracker.Accept(tracked); tracker.AssertEmpty(); }
public async Task AddSingle_BackgroundDelete() { await using var tracker = new RecordingTracker(); tracker.AddDelete(file1); File.Delete(file1); Thread.Sleep(5000); tracker.AssertEmpty(); }
public async Task Many() { await using var tracker = new RecordingTracker(); foreach (var file in AllFiles.AllPaths) { tracker.AddDelete(file); } var menu = MenuBuilder.Build( () => { }, () => { }, tracker); await Verify(menu, settings); }