csharpdeeb25a2 | 1 | using CascadeIDE.Features.Editor.Application.Presentation; |
| 2 | using Xunit; |
| 3 | |
| 4 | namespace CascadeIDE.Tests; |
| 5 | |
| 6 | public class EditorHudBannerTextComposerTests |
| 7 | { |
| 8 | [Fact] |
| 9 | public void FormatDiagnosticSummary_Mixed() |
| 10 | { |
| 11 | var s = EditorHudBannerTextComposer.FormatDiagnosticSummary(2, 3); |
| 12 | Assert.Equal("2 ошибок, 3 предупреждений", s); |
| 13 | } |
| 14 | |
| 15 | [Fact] |
| 16 | public void FormatDiagnosticSummary_SingleError() |
| 17 | { |
| 18 | Assert.Equal("1 ошибка", EditorHudBannerTextComposer.FormatDiagnosticSummary(1, 0)); |
| 19 | } |
| 20 | |
| 21 | [Fact] |
| 22 | public void FormatReferenceOccurrenceSummary_Zero_Null() |
| 23 | { |
| 24 | Assert.Null(EditorHudBannerTextComposer.FormatReferenceOccurrenceSummary(0)); |
| 25 | } |
| 26 | |
| 27 | [Fact] |
| 28 | public void Combine_Both() |
| 29 | { |
| 30 | var t = EditorHudBannerTextComposer.Combine("a", "b"); |
| 31 | Assert.Equal("a · b", t); |
| 32 | } |
| 33 | } |
| 34 | |
View only · write via MCP/CIDE