| 1 | using CascadeIDE.Services.Presentation; |
| 2 | using Xunit; |
| 3 | |
| 4 | namespace CascadeIDE.Tests; |
| 5 | |
| 6 | public class PresentationPmPlusForwardPlacementTests |
| 7 | { |
| 8 | [Theory] |
| 9 | [InlineData(3, 1, true, 1, 0)] // (P+M)(F), primary center → PM left |
| 10 | [InlineData(3, 1, false, 1, 2)] // (F)(P+M), primary center → PM right |
| 11 | [InlineData(2, 0, true, 0, 1)] |
| 12 | [InlineData(2, 0, false, 0, 1)] |
| 13 | [InlineData(2, 1, true, 1, 0)] |
| 14 | [InlineData(2, 1, false, 1, 0)] |
| 15 | public void ComputeForwardAndPmOrderedIndices_ThreeAndTwoMonitors( |
| 16 | int orderedCount, |
| 17 | int primaryIdx, |
| 18 | bool pmBeforeForward, |
| 19 | int expectForward, |
| 20 | int expectPm) |
| 21 | { |
| 22 | PresentationPmPlusForwardPlacement.ComputeForwardAndPmOrderedIndices( |
| 23 | orderedCount, |
| 24 | primaryIdx, |
| 25 | pmBeforeForward, |
| 26 | out var f, |
| 27 | out var pm); |
| 28 | Assert.Equal(expectForward, f); |
| 29 | Assert.Equal(expectPm, pm); |
| 30 | } |
| 31 | } |
| 32 | |