Convert Display and Video fully over to properties

This commit is contained in:
Matt Nadareski
2026-04-03 13:08:36 -04:00
parent 32dd30adab
commit 1d5514b29d
36 changed files with 370 additions and 177 deletions

View File

@@ -1815,6 +1815,24 @@ namespace SabreTools.Data.Extensions.Test
Assert.Equal(expected, actual);
}
[Theory]
[InlineData(null, null)]
[InlineData("0", Rotation.North)]
[InlineData("north", Rotation.North)]
[InlineData("vertical", Rotation.North)]
[InlineData("90", Rotation.East)]
[InlineData("east", Rotation.East)]
[InlineData("horizontal", Rotation.East)]
[InlineData("180", Rotation.South)]
[InlineData("south", Rotation.South)]
[InlineData("270", Rotation.West)]
[InlineData("west", Rotation.West)]
public void AsRotationTest(string? field, Rotation? expected)
{
Rotation? actual = field.AsRotation();
Assert.Equal(expected, actual);
}
[Theory]
[InlineData(null, null)]
[InlineData("no", Runnable.No)]
@@ -2124,6 +2142,21 @@ namespace SabreTools.Data.Extensions.Test
Assert.Equal(expected, actual);
}
[Theory]
[InlineData(Rotation.North, true, "vertical")]
[InlineData(Rotation.North, false, "0")]
[InlineData(Rotation.East, true, "horizontal")]
[InlineData(Rotation.East, false, "90")]
[InlineData(Rotation.South, true, "vertical")]
[InlineData(Rotation.South, false, "180")]
[InlineData(Rotation.West, true, "horizontal")]
[InlineData(Rotation.West, false, "270")]
public void FromRotationTest(Rotation field, bool useSecond, string? expected)
{
string? actual = field.AsStringValue(useSecond);
Assert.Equal(expected, actual);
}
[Theory]
[InlineData((Runnable)int.MaxValue, null)]
[InlineData(Runnable.No, "no")]