-
Notifications
You must be signed in to change notification settings - Fork 0
more properties to validator + tests #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/controller-service-repository-cristi
Are you sure you want to change the base?
more properties to validator + tests #35
Conversation
…to feature/app
toate bune frfr
all actuators + security config
| public class CarValidator { | ||
|
|
||
| public static Boolean validateCar(Car car) throws CarValidatorException { | ||
| validateCarMakerOrModel(car.getMaker(), "maker"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't do that :) 2 different functions maybe with reuse of code from a common private function
|
|
||
| public static void validateCarMakerOrModel(String name, String type) throws CarValidatorException { | ||
| switch(type){ | ||
| case "maker":{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the switch you have more lines than having 2 different independent functions. SOLID, S - Single Responsability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.