public TesteFitForRegistrationValidation(ITesteRepository testeRepository)
        {
            _testeRepository = testeRepository;

            RuleFor(x => x.Name).Must(name =>
            {
                return(_testeRepository.GetByName(name) == null);
            }).WithMessage(x => $"Teste {x.Name} já cadastrado.");
        }
Exemplo n.º 2
0
 public TesteMoreController(ITesteRepository rep, ITesteApplicationService app, ILoggerFactory logger)
 {
     this._rep    = rep;
     this._app    = app;
     this._logger = logger.CreateLogger <TesteController>();
 }
Exemplo n.º 3
0
 public TesteService(ITesteRepository testeRepository)
 {
     _testeRepository = testeRepository;
 }
Exemplo n.º 4
0
 public TesteRepositoryTests()
 {
     _testeRepository = Resolve <ITesteRepository>();
 }
Exemplo n.º 5
0
 public ReferenciaRepositoryTests()
 {
     _referenciaRepository = Resolve <IReferenciaRepository>();
     _testeRepository      = Resolve <ITesteRepository>();
 }
Exemplo n.º 6
0
 public TesteAptoParaCadastroWarning(ITesteRepository rep)
 {
     //base.Add(Guid.NewGuid().ToString(), new Rule<Teste>(Instance of RuleClassName,"message for user"));
 }
 public TesteService(ITesteRepository rep, ICache cache)
     : base(rep, cache)
 {
 }
 public TesteController(ITesteRepository repositorio)
 {
     _repositorio = repositorio;
 }
Exemplo n.º 9
0
 public TesteServiceBase(ITesteRepository rep, ICache cache)
     : base(cache)
 {
     this._rep = rep;
 }