From 6e9b082864bdfb5e4f8eb4acd2315367a7bdea86 Mon Sep 17 00:00:00 2001 From: tacosontitan <65432314+tacosontitan@users.noreply.github.com> Date: Sun, 14 Apr 2024 10:01:41 -0500 Subject: [PATCH] Defined tests for equals reversal. --- .../Logic/EqualsReversalTests.cs | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/Hussy.Net.Tests/Logic/EqualsReversalTests.cs diff --git a/test/Hussy.Net.Tests/Logic/EqualsReversalTests.cs b/test/Hussy.Net.Tests/Logic/EqualsReversalTests.cs new file mode 100644 index 0000000..3bf7be6 --- /dev/null +++ b/test/Hussy.Net.Tests/Logic/EqualsReversalTests.cs @@ -0,0 +1,25 @@ +namespace Hussy.Net.Tests.Logic; + +public class EqualsReversalTests +{ + [Theory] + [InlineData("")] + [InlineData(" ")] + [InlineData(0)] + [InlineData(121)] + [InlineData("abba")] + public void EqualsReversal_InputMatchesReversal_ReturnsTrue(object testValue) + { + var reversalEqualsTestValue = testValue.EqRev(); + Assert.True(reversalEqualsTestValue); + } + + [Theory] + [InlineData(-1)] + [InlineData("123")] + public void EqualsReversal_InputDoesNotMatchReversal_ReturnsFalse(object testValue) + { + var reversalEqualsTestValue = testValue.EqRev(); + Assert.False(reversalEqualsTestValue); + } +} \ No newline at end of file