Пример #1
0
        public UserPositionTests()
        {
            var mockMapper = new MapperConfiguration(cfg =>
            {
                cfg.AddProfile(new AutoMapping());
            });

            _mapper = mockMapper.CreateMapper();

            _userPositionRepository = new Mock <IUserPositionRepository>();


            _userPositionService = new UserPositionService(_userPositionRepository.Object);

            //inject
            _controller = new UserPositionController(_userPositionService, _mapper);
        }
Пример #2
0
 public UserPositionController(IUserPositionService userPositionService, IMapper mapper)
 {
     _userPositionService = userPositionService;
     _mapper = mapper;
 }
 /// <summary>
 /// 初始化用户岗位控制器
 /// </summary>
 /// <param name="service">用户岗位服务</param>
 public UserPositionController(IUserPositionService service) : base(service)
 {
     UserPositionService = service;
 }
Пример #4
0
 public UserPositionController(IUserPositionService userPositionService)
 {
     _userpositionService = userPositionService;
 }