コード例 #1
0
        public PdvRequestValidator(IPdvRepository repository)
        {
            this._repository = repository;

            RuleFor(x => x.TradingName).NotNull().NotEmpty();
            RuleFor(x => x.OwnerName).NotNull().NotEmpty();
            RuleFor(x => x.Document).NotNull().NotEmpty().Must(BeAvailable).WithMessage("Document not available");
            RuleFor(x => x.CoverageArea).NotNull().NotEmpty().Must(BeAValidMultiPolygon).WithMessage("Invalid MultiPolygon");
            RuleFor(x => x.Address).NotNull().NotEmpty().Must(BeAValidPoint).WithMessage("Invalid Point");;
        }
コード例 #2
0
ファイル: UnitOfWork.cs プロジェクト: jbravobr/Desafio-TOTVS
 private void resetRepositories()
 {
     _pdvReadRepository  = null;
     _userReadRepository = null;
 }
コード例 #3
0
ファイル: PdvService.cs プロジェクト: loretorafa/zx_challenge
 public PdvService(IPdvRepository repository)
 {
     this._repository = repository;
     this._validator  = new PdvRequestValidator(_repository);
 }
コード例 #4
0
 public void Setup()
 {
     this._repository = new FakePdvRepository();
     this._service    = new PdvService(_repository);
 }
コード例 #5
0
 public CustomMongoSeeder(IMongoDatabase database, IPdvRepository pdvRepository) : base(database)
 {
     _pdvRepository = pdvRepository;
 }
コード例 #6
0
 public ValuesController(IPdvRepository pdvRepository)
 {
     _pdvRepository = pdvRepository;
 }
コード例 #7
0
 public void Setup()
 {
     this._repository = new PdvRepository(_context);
 }