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>
50 lines
1.4 KiB
C#
50 lines
1.4 KiB
C#
using FluentAssertions;
|
|
using QuiverLauncher.Services;
|
|
|
|
namespace QuiverLauncher.Tests;
|
|
|
|
public class GamepadConnectionStateTests
|
|
{
|
|
[Theory]
|
|
[InlineData(0, 0, null)]
|
|
[InlineData(1, 1, null)]
|
|
[InlineData(2, 3, null)]
|
|
[InlineData(0, 1, true)]
|
|
[InlineData(0, 2, true)]
|
|
[InlineData(1, 0, false)]
|
|
[InlineData(3, 0, false)]
|
|
public void GetConnectionChangedSignal_only_when_crossing_zero(
|
|
int previousCount,
|
|
int nextCount,
|
|
bool? expected)
|
|
{
|
|
InputService.GetConnectionChangedSignal(previousCount, nextCount).Should().Be(expected);
|
|
}
|
|
|
|
[Theory]
|
|
[InlineData(true, true, true)]
|
|
[InlineData(true, false, false)]
|
|
[InlineData(false, true, false)]
|
|
[InlineData(false, false, false)]
|
|
public void ShouldKeepOpenController_only_when_already_open_and_attached(
|
|
bool alreadyOpen,
|
|
bool attached,
|
|
bool expected)
|
|
{
|
|
InputService.ShouldKeepOpenController(alreadyOpen, attached).Should().Be(expected);
|
|
}
|
|
|
|
[Theory]
|
|
[InlineData(true, true, false)]
|
|
[InlineData(true, false, true)]
|
|
[InlineData(false, true, false)]
|
|
[InlineData(false, false, false)]
|
|
public void ShouldReopenController_when_already_open_but_detached(
|
|
bool alreadyOpen,
|
|
bool attached,
|
|
bool expected)
|
|
{
|
|
InputService.ShouldReopenController(alreadyOpen, attached).Should().Be(expected);
|
|
}
|
|
}
|