OtripleS icon indicating copy to clipboard operation
OtripleS copied to clipboard

CODE RUB: Exam Fee Status Enum Validation

Open ShriHumrudha opened this issue 3 years ago • 5 comments

Reference: https://github.com/hassanhabib/OtripleS/pull/499

ShriHumrudha avatar Oct 16 '21 17:10 ShriHumrudha

@hassanhabib & @ShriHumrudha How do I work with this issue and similar issues #505 #506 #507 #508 & #510? Looking for your advice!

arafat-pro avatar Nov 11 '21 16:11 arafat-pro

The reference is mentioned in the first comment - #499

ShriHumrudha avatar Nov 11 '21 20:11 ShriHumrudha

May I request a little guidance for any one from these above referenced specific issues. They are different in implementation, which I am still working on to understand.

In all of them below method is missing

public​ ​async​ ​void​ ​ShouldThrowValidationExceptionOnCreateWhenEntityIsInvalidAndLogItAsync​(){}

arafat-pro avatar Nov 11 '21 20:11 arafat-pro

@hassanhabib I am looking for some suggestions!

May I request a little guidance for anyone from these above referenced specific issues. They are different in implementation, which I am still working on it to understand.

In all of them below method is missing

public​ ​async​ ​void​ ​ShouldThrowValidationExceptionOnCreateWhenEntityIsInvalidAndLogItAsync​(){}

arafat-pro avatar Nov 14 '21 05:11 arafat-pro

@hassanhabib I am looking for some suggestions!

May I request a little guidance for anyone from these above referenced specific issues. They are different in implementation, which I am still working on it to understand. In all of them below method is missing

public​ ​async​ ​void​ ​ShouldThrowValidationExceptionOnCreateWhenEntityIsInvalidAndLogItAsync​(){}

@arafat-pro so the validations of enums is a new Standard that was introduced a little over a year ago. Some of our codebase in OtripleS didn't catch up to that yet, hence we have all these issues to address them.

The above mentioned issues all have the same solution, so is the new standard for validations. But these are two different issues. Don't include enum validation as part of the basic structural validations that we do with InvalidEntityException. They should have their own tests such as: ShouldThrowValidationExceptionOnAddIfStatusIsInvalidAndLogitAsync that's an individual test that has it's own issues. Hope this helps.

hassanhabib avatar Nov 14 '21 07:11 hassanhabib