public void When_calling_ThrowIfShorterThan_with_values_larger_than_length_with_custom_argumentName_and_custom_message_exception_properties_should_match(string testValue, int testLength)
        {
            const string testValueParamName = nameof(testValue);

            AssertThatExceptionParamNameAndMessageShouldMatch <ArgumentLengthShorterThanException>(() => StringGuardiansExtension.ThrowIfShorterThan(testValue, testLength, testValueParamName, TestCustomExceptionMessage), testValueParamName, TestCustomExceptionMessage);
        }
        public void When_calling_ThrowIfShorterThan_with_null_values_should_throw_ArgumentNullException(string testValue)
        {
            const int testLength = 0;

            AssertThatThrows <ArgumentNullException>(() => StringGuardiansExtension.ThrowIfShorterThan(testValue, testLength, nameof(testValue)));
        }
        public void When_calling_ThrowIfShorterThan_with_values_larger_than_length_exception_argumentName_and_message_should_match_default(string testValue, int testLength)
        {
            testValue.ThrowIfNull(nameof(testValue));

            var defaultMessage = string.Format(CultureInfo.InvariantCulture, FlabIt.Guardians.Properties.Resources.Exception_ArgumentOfTypeXShorterThanMessageWithParamName, DefaultArgumentName, typeof(string).FullName, testLength, testValue.Length);

            AssertThatExceptionParamNameAndMessageShouldMatchDefaultArgumentName <ArgumentLengthShorterThanException>(() => StringGuardiansExtension.ThrowIfShorterThan(testValue, testLength), defaultMessage);
        }
 public void When_calling_ThrowIfShorterThan_with_values_larger_than_length_with_custom_message_exception_message_should_match(string testValue, int testLength)
 {
     AssertThatExceptionMessageShouldMatchCustomMessage <ArgumentLengthShorterThanException>(() => StringGuardiansExtension.ThrowIfShorterThan(testValue, testLength, message: TestCustomExceptionMessage));
 }
        public void When_calling_ThrowIfShorterThan_with_null_values_with_custom_argumentName_exception_argumentName_should_match(string testValue)
        {
            const string testValueParamName = nameof(testValue);
            const int    testLength         = 0;

            AssertThatExceptionParamNameShouldMatchCustomArgumentName <ArgumentNullException>(() => StringGuardiansExtension.ThrowIfShorterThan(testValue, testLength, testValueParamName), testValueParamName);
        }
        public void When_calling_ThrowIfShorterThan_with_null_values_with_custom_message_exception_message_should_match(string testValue)
        {
            const int testLength = 0;

            AssertThatExceptionMessageShouldMatchCustomMessage <ArgumentNullException>(() => StringGuardiansExtension.ThrowIfShorterThan(testValue, testLength, message: TestCustomExceptionMessage));
        }
        public void When_calling_ThrowIfShorterThan_with_null_values_exception_argumentName_and_message_should_match_default(string testValue)
        {
            const int testLength = 0;

            var defaultMessage = string.Format(CultureInfo.InvariantCulture, FlabIt.Guardians.Properties.Resources.Exception_ArgumentNullMessageWithParamName, DefaultArgumentName);

            AssertThatExceptionParamNameAndMessageShouldMatchDefaultArgumentName <ArgumentNullException>(() => StringGuardiansExtension.ThrowIfShorterThan(testValue, testLength), defaultMessage);
        }
 public void When_calling_ThrowIfShorterThan_with_values_larger_than_or_equal_to_length_should_return_input_as_output(string testValue, int testLength)
 {
     AssertThatReturnsInputAsOutput(() => StringGuardiansExtension.ThrowIfShorterThan(testValue, testLength), testValue);
 }
 public void When_calling_ThrowIfShorterThan_with_values_not_shorter_than_given_length_should_not_throw(string testValue, int testLength)
 {
     AssertThatDoesNotThrow(() => StringGuardiansExtension.ThrowIfShorterThan(testValue, testLength));
 }
 public void When_calling_ThrowIfShorterThan_with_values_shorter_than_given_length_should_throw_ArgumentLengthShorterThanException(string testValue, int testLength)
 {
     AssertThatThrows <ArgumentLengthShorterThanException>(() => StringGuardiansExtension.ThrowIfShorterThan(testValue, testLength));
 }
 public void When_calling_ThrowIfShorterThan_with_non_null_values_should_not_throw(string testValue)
 {
     AssertThatDoesNotThrow(() => StringGuardiansExtension.ThrowIfShorterThan(testValue, testValue.Length - 1));
 }