ValidatorTest.cs 695 B

12345678910111213141516171819202122
  1. using Quadarax.Foundation.Core.Data.Interface.Entity;
  2. using Quadarax.Foundation.Core.Value;
  3. namespace qdr.fnd.core.test
  4. {
  5. public abstract class ValidatorTest<TValidator, TDto> : DtoTest<TDto> where TDto : IDto, new()
  6. where TValidator : Validator<TDto>, new()
  7. {
  8. protected TValidator Validator { get; private set; } = null!;
  9. protected ValidatorContext Context { get; private set; } = null!;
  10. protected override void OnSetup()
  11. {
  12. base.OnSetup();
  13. Context = new ValidatorContext();
  14. Validator = new TValidator();
  15. }
  16. protected override void OnTearDown()
  17. {
  18. }
  19. }
  20. }