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); }
public UserPositionController(IUserPositionService userPositionService, IMapper mapper) { _userPositionService = userPositionService; _mapper = mapper; }
/// <summary> /// 初始化用户岗位控制器 /// </summary> /// <param name="service">用户岗位服务</param> public UserPositionController(IUserPositionService service) : base(service) { UserPositionService = service; }
public UserPositionController(IUserPositionService userPositionService) { _userpositionService = userPositionService; }