Question: To write good tests we need to know what the code is supposed to do...what are the requirements? Let's create a simple password validator.

 

 

To write good tests we need to know what the code is

To write good tests we need to know what the code is supposed to do...what are the requirements? Let's create a simple password validator. It is going to take in a password String and return true if the password meets certain strength criteria and false otherwise. To meet the criteria, the password must have: A length of at least 8 At least one special character At least one uppercase character 13

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!