Input validation for Unit Testing RRS feed

  • Question

  • User1904516115 posted

    Do we need to write the code for input validation for Unit Testing?

    Monday, January 14, 2019 10:16 AM


  • User-821857111 posted

    Your question is not clear. Are you asking whether you should unit test your input validation? Or are you asking whether you should write code to validate input values that are being provided to a unit test? Or something else?

    You can write tests to ensure that your input validation is in place and that it performs the correct validation. But you shouldn't need to validate input values for a unit test. You have total control over those. There should be nothing to validate. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 14, 2019 11:00 AM