mirror of
https://github.com/tgeorgiadis/quiver-launcher.git
synced 2026-12-06 11:47:59 -05:00
- Introduce Android app - Migrate project files to .NET 10, updating dependencies and workflows. - Migrate project to Avalonia 12 - Refactor App.axaml to include a ResourceDictionary for theme management. - Introduce new styles for gamepad navigation and focus rings. - Implement hosted main view management for better application lifecycle handling. - Remove deprecated MainWindow.Mods.cs file and related code. - Update README to reflect changes in project structure and requirements. Co-authored-by: Cursor <cursoragent@cursor.com>
32 lines
892 B
C#
32 lines
892 B
C#
using System.Collections.Specialized;
|
|
using FluentAssertions;
|
|
using QuiverLauncher.Services;
|
|
|
|
namespace QuiverLauncher.Tests;
|
|
|
|
public class ResettableObservableCollectionTests
|
|
{
|
|
[Fact]
|
|
public void ReplaceWith_swaps_items_and_raises_a_single_reset()
|
|
{
|
|
var collection = new ResettableObservableCollection<string> { "old" };
|
|
var changes = new List<NotifyCollectionChangedAction>();
|
|
collection.CollectionChanged += (_, e) => changes.Add(e.Action);
|
|
|
|
collection.ReplaceWith(["a", "b", "c"]);
|
|
|
|
collection.Should().Equal("a", "b", "c");
|
|
changes.Should().Equal(NotifyCollectionChangedAction.Reset);
|
|
}
|
|
|
|
[Fact]
|
|
public void ReplaceWith_empty_clears_the_collection()
|
|
{
|
|
var collection = new ResettableObservableCollection<int> { 1, 2 };
|
|
|
|
collection.ReplaceWith([]);
|
|
|
|
collection.Should().BeEmpty();
|
|
}
|
|
}
|