public void Setup() { this.context = HubContextImplementation.GetContext; this.cardRepository = new CardRepository(); this.deckRepository = new DeckRepository(); this.discussionResultRepository = new DiscussionResultRepository(); this.roomRepository = new RoomRepository(); this.userRepository = new UserRepository(); this.userService = new UserService(this.userRepository, this.context); this.cardService = new CardService(this.cardRepository, this.context, this.userService); this.deckService = new DeckService(this.deckRepository, this.cardRepository, this.context, this.userService); this.discussionResultService = new DiscussionResultService(this.discussionResultRepository, this.cardRepository, this.userRepository); this.roomService = new RoomService(this.roomRepository, this.userRepository, this.deckRepository, this.context, this.userService, this.discussionResultService); this.userService.AddUserToConnectionMap("TestUser", "TestConnection"); this.cards = new Cards(); this.decks = new Decks(); this.discussionResults = new DiscussionResults(); this.rooms = new Rooms(); this.users = new Users(); InvokedSignalRMethod = string.Empty; }
/// <summary> /// Конструктор контроллера. /// </summary> /// <param name="service">Сервис-синглтон.</param> public DiscussionResultsController(DiscussionResultService service) { this.service = service; }