public void SetUpService() { AutoMapperConfiguration.Configure(); _mock = new Mock <IUnitOfWork>(); _userServiceMock = new Mock <IUserService>(); _genreService = new GenresService(_mock.Object); _gameService = new GamesService(_mock.Object); _typeService = new PlatformTypesService(_mock.Object); _roleService = new RolesService(_mock.Object); _commentService = new CommentsService(_mock.Object, _userServiceMock.Object); _orderService = new OrdersService(_mock.Object); _translateService = new TranslateService <Game, GameDTO>(_mock.Object); _translateGenreService = new TranslateService <Genre, GenreDTO>(_mock.Object); _service = new Service <Game, GameDTO>(_mock.Object); _mock.Setup(a => a.Repository <Genre>().GetAll()).Returns(new List <Genre>()); _mock.Setup(a => a.Repository <PlatformType>().GetAll()).Returns(new List <PlatformType>()); _mock.Setup(a => a.Repository <Genre>().Edit(It.IsAny <Genre>())); _mock.Setup(a => a.Repository <GenreTranslate>().GetAll()).Returns(new List <GenreTranslate>()); _mock.Setup(a => a.Repository <Comment>().Add(It.IsAny <Comment>())); _mock.Setup(a => a.Repository <Game>().Add(It.IsAny <Game>())); _mock.Setup(a => a.Repository <Game>().Edit(It.IsAny <Game>())); _mock.Setup(a => a.Repository <Game>().GetSingle(It.IsAny <string>())).Returns(new Game()); _mock.Setup(a => a.Repository <Game>().Delete(It.IsAny <Game>())); _mock.Setup(a => a.Repository <Game>().FindBy(It.IsAny <Expression <Func <Game, bool> > >())) .Returns(new List <Game>()); }
public CurrencyController( INamedService <string, Currency, NamedFilters> service, IMapper mapper ) : base( service, mapper) { }
public LegalEntityController( INamedService <Guid, LegalEntity, NamedFilters> service, IMapper mapper ) : base( service, mapper) { }
public RoleController( INamedService <Guid, Role, NamedFilters> service, IMapper mapper ) : base( service, mapper) { }
public BranchController( INamedService <Guid, Branch, NamedFilters> service, IMapper mapper ) : base( service, mapper) { }
protected NamedController( INamedService <TId, TNamed, TNamedFilters> service, IMapper mapper ) : base( service, mapper) { _service = service; _mapper = mapper; }
public GamesController(IGameService gameService, INamedService <PlatformTypeDTO, PlatformTypeDTOTranslate> type, INamedService <GenreDTO, GenreDTOTranslate> genre, IOrderService orders, INamedService <PublisherDTO, PublisherDTOTranslate> publisher, IAuthenticationManager authentication) : base(authentication) { _genreService = genre; _publisherService = publisher; _typeService = type; _orderService = orders; _gameService = gameService; }
public CountriesController(INamedService <Country> service) { _service = service; }
public ShapesController(INamedService <Shape> service) { _service = service; }
public ServiceWithImportedCtorParameter([Import("blah")] INamedService namedDependency) { NamedDependency = namedDependency; }
public GenresController(INamedService <GenreDTO, GenreDTOTranslate> genre, IAuthenticationManager authentication) : base(authentication) { _genreService = genre; }
public PlatformTypesController(INamedService <PlatformTypeDTO, PlatformTypeDTOTranslate> publisher, IAuthenticationManager authentication) : base(authentication) { _typeService = publisher; }
public PublishersController(INamedService <PublisherDTO, PublisherDTOTranslate> publisher, IAuthenticationManager authentication) : base(authentication) { _publisherService = publisher; }
public UsersController(IGameService service, IUserService user, INamedService <RoleDTO, RoleDTOTranslate> roleService, IAuthenticationManager authentication) : base(authentication) { _service = service; _userService = user; _roleService = roleService; }
public AlloysController(INamedService <Alloy> service) { _service = service; }
public CurrenciesController(INamedService <Currency> service) { _service = service; }
public SubjectsController(INamedService <Subject> service) { _service = service; }
public RolesController(INamedService <RoleDTO, RoleDTOTranslate> role, IAuthenticationManager authentication) : base(authentication) { _roleService = role; }