Ejemplo n.º 1
0
        public void ParameterGuard_EmptyStringCheck_CheckEmptyStringWithoutGivenMessage_ShouldThrowArgumentExceptionWithGivenParamNameAndMessage()
        {
            try
            {
                ParameterGuard.EmptyStringCheck(String.Empty, ParameterName);
            }
            catch (ArgumentException ex)
            {
                ValidateExceptionParameterName(ex, ParameterName);

                // If value of ex.ParamName is expected, rethrow the ArgumentException to
                // make the test pass.
                throw;
            }
        }
Ejemplo n.º 2
0
 public void ParameterGuard_EmptyStringCheck_CheckNullValueWithoutGivenMessage_ShouldNotThrowException()
 {
     ParameterGuard.EmptyStringCheck(null, ParameterName);
 }
Ejemplo n.º 3
0
 public void ParameterGuard_EmptyStringCheck_CheckNonEmptyAndNonNullValueWithGivenMessage_ShouldNotThrowException()
 {
     ParameterGuard.EmptyStringCheck(NonEmptyString, ParameterName, CustomExceptionMessage);
 }