- By Rowan Lea
- ·
- Posted Jan 25, 2024 10:21:11 AM
Songbird
Inspired by the creative works of Gawain Hewitt: https://gawainhewitt.co.uk/
Design and implement a software that validates a password applying TDD.
The password will be introduced by the user (as an argument of the method) and should return if the password is valid or not.
A valid password should meet the following requirements:
Design and implement software that can adapt to different password validation rules TDD and focus on the OOP principles.
Let's pretend that now we want to create another type of password validations because on our app we need different type of passwords, such as:
Validation 2:
Validation 3:
In this iteration, we should try to identify a good abstraction and try to work on OOP principles as well as on design patterns like Builder and Factory
Use object calisthenics.
Now we can know if a password is valid or not, but we cannot understand why, in this iteration, we should be able to return a list of errors for each invalid password, so we could know why the password it's not valid.
Identify how maintainable it's the code that you've built so far, and how it adapts to change, this iteration could change depending on the programming language that you use.
Up untill this point we've been able to create a list of validation rules and validate the password passes all the validation rules, but now we want a new password with the same rules but allowing to fail only one of them.
Validation 4
Examples:
This password it's a valid password
This will help to enforce encapsulation for the lists of rules and have a better design for validation strategies [preventing us from using inheritance], this also could help us work on the Strategy pattern.
Inspired by the creative works of Gawain Hewitt: https://gawainhewitt.co.uk/
What do we want to build? We are building a shopping cart for an online grocery shop. The idea of this kata is to build the product in an iterative..
Iteration 1 Business rules We want to build an ATM machine and the first thing we need to do, is to create the software that will breakdown which..
Join our newsletter for expert tips and inspirational case studies
Join our newsletter for expert tips and inspirational case studies