From e0ff976d2120f1af90d7ec3f3f9f1e1e34909ad8 Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 19 Jan 2026 16:08:39 +0100 Subject: [PATCH] Add unit tests for EnvelopeSigningType.Normalize method Added ConstantsTests to verify Normalize behavior for EnvelopeSigningType, including handling of valid and out-of-range enum values using NUnit test cases. Ensures normalization logic works as expected. --- .../Domain/ConstantsTests.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 EnvelopeGenerator.Tests/Domain/ConstantsTests.cs diff --git a/EnvelopeGenerator.Tests/Domain/ConstantsTests.cs b/EnvelopeGenerator.Tests/Domain/ConstantsTests.cs new file mode 100644 index 00000000..23effd3e --- /dev/null +++ b/EnvelopeGenerator.Tests/Domain/ConstantsTests.cs @@ -0,0 +1,17 @@ +using EnvelopeGenerator.Domain.Constants; +using NUnit.Framework; + +namespace EnvelopeGenerator.Tests.Domain; + +public class ConstantsTests +{ + [TestCase(EnvelopeSigningType.ReadAndSign, EnvelopeSigningType.ReadAndSign)] + [TestCase(EnvelopeSigningType.WetSignature, EnvelopeSigningType.WetSignature)] + [TestCase((EnvelopeSigningType)5, EnvelopeSigningType.WetSignature)] + public void Normalize_ReturnsExpectedValue(EnvelopeSigningType input, EnvelopeSigningType expected) + { + var normalized = input.Normalize(); + + Assert.That(normalized, Is.EqualTo(expected)); + } +}