StefanPenchev05 / MyClothesV2

Welcome to MyClothes, where creativity meets fashion! This application provides a platform for designers to showcase their clothing products, receive feedback through comments and likes, engage in real-time chat, and even get hired by clients who love their work.
MIT License
0 stars 0 forks source link

Unit Testing the Validator Class #11

Closed StefanPenchev05 closed 4 months ago

StefanPenchev05 commented 4 months ago

This task is all about ensuring the robustness of our Validator class. We'll be crafting a suite of unit tests that will put our Validator through its paces, ensuring it can handle anything thrown at it.

Here's what we'll be focusing on:

Testing Name Validation: We'll test the isFirstAndLastName method with a variety of inputs, including valid names, names with non-alphabetic characters, and empty strings. Our goal is to ensure that only valid names pass the test.

Testing Email Validation: We'll challenge the isEmail method with a range of email formats - both valid and invalid. We'll also test it with domains that don't have DNS records to ensure it's checking them correctly.

Testing Username Validation: We'll test the isUsername method with a mix of valid and invalid usernames, including those with special characters, spaces, and non-alphanumeric characters.

Testing Password Validation: We'll put the isPassword method to the test with passwords of varying lengths and complexities. We'll include passwords that should pass and those that should fail based on our criteria.

Each test will be designed to cover all possible edge cases, ensuring our Validator class is ready for anything. By the end of this task, we'll have a Validator that we can trust to keep our data clean and our system secure.