test: the choice between window surfaces and the processor is covered

The choice moves out of Program, which no test runs, into
WindowSurfaces, where both branches are tested. Sonar's quality gate
failed on the coverage of the new code.
This commit is contained in:
maj00r
2026-11-25 18:10:22 +01:00
parent f9939fd566
commit ac8ed6d5fe
3 changed files with 13 additions and 11 deletions

View File

@@ -21,11 +21,13 @@ public class WindowSurfacesTests
Assert.Contains(Win32RenderingMode.AngleEgl, WindowSurfaces.Win32Options.RenderingMode);
}
[Fact]
public void The_options_go_to_the_same_builder()
[Theory]
[InlineData(false)]
[InlineData(true)]
public void The_options_go_to_the_same_builder_with_or_without_the_processor(bool softwareRender)
{
var builder = AppBuilder.Configure<Avalonia.Application>();
Assert.Same(builder, WindowSurfaces.ApplyTo(builder));
Assert.Same(builder, WindowSurfaces.ApplyTo(builder, softwareRender));
}
}