From 0a225472d6c3abd87865c7626fcbe1955800389c Mon Sep 17 00:00:00 2001 From: David Kallesen Date: Tue, 23 Jan 2024 21:45:11 +0100 Subject: [PATCH] fix: LeftTopRightBottomType-Opposite --- src/Atc/Extensions/EnumAtcExtensions.cs | 4 ++-- test/Atc.Tests/Extensions/EnumAtcExtensionsTests.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Atc/Extensions/EnumAtcExtensions.cs b/src/Atc/Extensions/EnumAtcExtensions.cs index 07e71a18..50e233e1 100644 --- a/src/Atc/Extensions/EnumAtcExtensions.cs +++ b/src/Atc/Extensions/EnumAtcExtensions.cs @@ -102,9 +102,9 @@ public static LeftTopRightBottomType Opposite( => leftTopRightBottomType switch { LeftTopRightBottomType.Left => LeftTopRightBottomType.Right, - LeftTopRightBottomType.Top => LeftTopRightBottomType.Top, + LeftTopRightBottomType.Top => LeftTopRightBottomType.Bottom, LeftTopRightBottomType.Right => LeftTopRightBottomType.Left, - LeftTopRightBottomType.Bottom => LeftTopRightBottomType.Bottom, + LeftTopRightBottomType.Bottom => LeftTopRightBottomType.Top, _ => LeftTopRightBottomType.None, }; diff --git a/test/Atc.Tests/Extensions/EnumAtcExtensionsTests.cs b/test/Atc.Tests/Extensions/EnumAtcExtensionsTests.cs index a3f9fdaf..9667ab81 100644 --- a/test/Atc.Tests/Extensions/EnumAtcExtensionsTests.cs +++ b/test/Atc.Tests/Extensions/EnumAtcExtensionsTests.cs @@ -55,9 +55,9 @@ public void Opposite_LeftRightType(LeftRightType expected, LeftRightType input) [Theory] [InlineData(LeftTopRightBottomType.Left, LeftTopRightBottomType.Right)] - [InlineData(LeftTopRightBottomType.Top, LeftTopRightBottomType.Top)] + [InlineData(LeftTopRightBottomType.Top, LeftTopRightBottomType.Bottom)] [InlineData(LeftTopRightBottomType.Right, LeftTopRightBottomType.Left)] - [InlineData(LeftTopRightBottomType.Bottom, LeftTopRightBottomType.Bottom)] + [InlineData(LeftTopRightBottomType.Bottom, LeftTopRightBottomType.Top)] [InlineData(LeftTopRightBottomType.None, LeftTopRightBottomType.None)] public void Opposite_LeftTopRightBottomType(LeftTopRightBottomType expected, LeftTopRightBottomType input) => Assert.Equal(expected, input.Opposite());