| 1 | using CascadeIDE.Features.Launch.Application; |
| 2 | using Xunit; |
| 3 | |
| 4 | namespace CascadeIDE.Tests; |
| 5 | |
| 6 | public sealed class StartupProjectBannerProjectionTests |
| 7 | { |
| 8 | [Fact] |
| 9 | public void Empty_when_no_startup() |
| 10 | { |
| 11 | Assert.Equal("", StartupProjectBannerProjection.Format(false, false, null, "")); |
| 12 | } |
| 13 | |
| 14 | [Theory] |
| 15 | [InlineData(true, "", "short", "Старт отладки (F5): short")] |
| 16 | [InlineData(false, "", "short", "Старт отладки (F5): short")] |
| 17 | [InlineData(true, null, "App", "Старт отладки (F5): App")] |
| 18 | [InlineData(true, "prof", "App", "Старт отладки (F5): App · prof")] |
| 19 | public void Banner_with_optional_profile_suffix( |
| 20 | bool showPicker, |
| 21 | string? profileId, |
| 22 | string shortLabel, |
| 23 | string expected) => |
| 24 | Assert.Equal( |
| 25 | expected, |
| 26 | StartupProjectBannerProjection.Format(true, showPicker, profileId, shortLabel)); |
| 27 | |
| 28 | [Fact] |
| 29 | public void Picker_without_profile_id_uses_base_only() |
| 30 | { |
| 31 | Assert.Equal( |
| 32 | "Старт отладки (F5): X", |
| 33 | StartupProjectBannerProjection.Format(true, true, "", "X")); |
| 34 | } |
| 35 | } |
| 36 | |