csharp4405de34 | 1 | using CascadeIDE.Cockpit.Graph.Layout; |
| 2 | using CascadeIDE.Models; |
| 3 | using Xunit; |
| 4 | |
| 5 | namespace CascadeIDE.Tests; |
| 6 | |
| 7 | public sealed class GraphFileLayoutMetricsTests |
| 8 | { |
| 9 | [Theory] |
| 10 | [InlineData(4, CodeNavigationMapDetailLevel.Normal, CodeNavigationMapRelatedGraphLayoutKind.Radial, 120)] |
| 11 | [InlineData(12, CodeNavigationMapDetailLevel.Normal, CodeNavigationMapRelatedGraphLayoutKind.Radial, 142)] |
| 12 | [InlineData(8, CodeNavigationMapDetailLevel.Normal, CodeNavigationMapRelatedGraphLayoutKind.TopDown, 380)] |
| 13 | public void EstimatePreferredHeight( |
| 14 | int satellites, |
| 15 | CodeNavigationMapDetailLevel detail, |
| 16 | string layout, |
| 17 | double expectedMin) |
| 18 | { |
| 19 | var h = GraphFileLayoutMetrics.EstimatePreferredHeight(satellites, detail, layout); |
| 20 | Assert.True(h >= expectedMin - 0.5); |
| 21 | } |
| 22 | |
| 23 | [Fact] |
| 24 | public void ResolveRadialOrbits_two_rings_outer_exceeds_inner() |
| 25 | { |
| 26 | var (inner, outer) = GraphFileLayoutMetrics.ResolveRadialOrbits(18, 360, 220, 13); |
| 27 | Assert.True(outer > inner); |
| 28 | Assert.True(inner >= 26); |
| 29 | } |
| 30 | } |
| 31 | |
View only · write via MCP/CIDE