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; } }
public void ParameterGuard_EmptyStringCheck_CheckNullValueWithoutGivenMessage_ShouldNotThrowException() { ParameterGuard.EmptyStringCheck(null, ParameterName); }
public void ParameterGuard_EmptyStringCheck_CheckNonEmptyAndNonNullValueWithGivenMessage_ShouldNotThrowException() { ParameterGuard.EmptyStringCheck(NonEmptyString, ParameterName, CustomExceptionMessage); }