public void Test_non_acceptable_tests(string input) { var entityUnderTest = new ShortToLongAccountCode(input); entityUnderTest.IsCorrectCode.Should().BeFalse(); entityUnderTest.LongCode.Should().BeNull(); }
private void SetUserInputCodeToLongFormat(Account account) { var shortToLongCode = new ShortToLongAccountCode(account.Code); if (!shortToLongCode.IsCorrectCode) { ModelState.AddModelError(nameof(Account.Code), "The code is in a wrong format. It must be supplied as up to 9 digits, with an optional dot (.) to separate first part from last part of the code."); } else { account.Code = shortToLongCode.LongCode; } }
public string Test_normal_cases(string input) { var entityUnderTest = new ShortToLongAccountCode(input); return(entityUnderTest.LongCode); }