예제 #1
0
        public PermissionServiceTest()
        {
            var mapperConfig = new MapperConfiguration(config =>
            {
                config.AddProfile <MapperRepository>();
            });

            _mapper          = mapperConfig.CreateMapper();
            _context         = InMemoryContextFactory.Create();
            this._repository = new PermissionRepository(_mapper, _context);

            this._service = new PermissionService(_repository);
        }
예제 #2
0
        public CompanyServiceTest()
        {
            var mapperConfig = new MapperConfiguration(config =>
            {
                config.AddProfile <MapperRepository>();
            });

            _mapper          = mapperConfig.CreateMapper();
            _context         = InMemoryContextFactory.Create();
            this._repository = new CompanyRepository(_mapper, _context);

            this._service = new CompanyService(_repository, _serviceUser, _permissionRepositoy, _repositoryPermission, _serviceLogin, _serviceEmail, _mapper);
        }
예제 #3
0
 public PermissionRepository(IMapper mapper, PortalParceiroDbContext context) : base(context)
 {
     _mapper  = mapper;
     _context = context;
     _context.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
 }
 public ProposalRepository(IMapper mapper, PortalParceiroDbContext context) : base(context)
 {
     _mapper  = mapper;
     _context = context;
 }