public void SetUp()
        {
            _mockVotingRepository = MockRepository.GenerateMock<IVotingRepository>();
            _votingService = new VideoGameVotingService(_mockVotingRepository);

            _mockVotingRepository.Stub(mvr => mvr.GetAllGames()).Return(_games);
        }
Example #2
0
 public VotingsController(IVotingRepository votingRepository,
                          IUserHelper userHelper,
                          ICandidateRepository candidateRepository)
 {
     this.votingRepository    = votingRepository;
     this.userHelper          = userHelper;
     this.candidateRepository = candidateRepository;
 }
Example #3
0
 public VotingController(IEmailRepository EmailRepo, RoleManager <IdentityRole> RoleManager, UserManager <AspNetUsers> UserManager, IBusinessPartnerRepository BPrepo, IVotingRepository VotingRepo)
 {
     _BPrepo      = BPrepo;
     _VotingRepo  = VotingRepo;
     _UserManager = UserManager;
     _RoleManager = RoleManager;
     _EmailRepo   = EmailRepo;
 }
Example #4
0
 public CastVoteTests()
 {
     _repo = A.Fake <IVotingRepository>(options => options.Strict());
     A.CallTo(() => _repo.GetCitizen(CitizenId)).Returns(Citizen);
     A.CallTo(() => _repo.GetBallotItem(BallotItemId)).Returns(BallotItemWithoutWriteIn);
     A.CallTo(() => _repo.IsCitizenEligibleToVoteOnBallotItem(CitizenId, BallotItemId)).Returns(true);
     A.CallTo(() => _repo.GetVote(CitizenId, BallotItemId)).Returns(null);
     A.CallTo(() => _repo.AddVote(CitizenId, BallotItemId, A <int> ._, A <string> ._)).Returns(VoteConfirmation);
     _service = new VotingService(_repo);
 }
Example #5
0
 public VotesController(
     IHouseRepository houseRepository,
     IPersonRepository personRepository,
     FirstHackathonDbContext context,
     IVotingRepository votingRepository
     )
 {
     _houseRepository  = houseRepository;
     _personRepository = personRepository;
     _context          = context;
     _votingRepository = votingRepository;
 }
Example #6
0
 public BlogService(
     IPostRepository postRepository,
     ICommentRepository commentRepository,
     IVotingRepository voteRepository,
     ITagRepostory tagRepository,
     ICategoryRepository categoryRepository,
     IUserRepository userRepository,
     IFollowRepository followRepository)
 {
     this.postRepository     = postRepository;
     this.commenRepository   = commentRepository;
     this.voteRepository     = voteRepository;
     this.tagRepoistory      = tagRepository;
     this.categoryRepository = categoryRepository;
     this.userRepository     = userRepository;
     this.followRepository   = followRepository;
 }
Example #7
0
        public UnitOfWork(
            IUserRepository userRepository,
            IVotingRepository votingRepository,
            VotingDbContext dbContext,
            IVotingOptionRepository votingOptionRepository,
            IVoteRepository voteRepository,
            IChatRepository chatRepository,
            IMessageRepository messageRepository)

        {
            UserRepository         = userRepository;
            VotingRepository       = votingRepository;
            _dbContext             = dbContext;
            VotingOptionRepository = votingOptionRepository;
            VoteRepository         = voteRepository;
            ChatRepository         = chatRepository;
            MessageRepository      = messageRepository;
        }
Example #8
0
 public VotingService(IVotingRepository votingRepository, ILog logger)
 {
     _votingRepository = votingRepository;
     _logger           = logger;
 }
Example #9
0
 public VotingsController(IVotingRepository votingRepository, IUserHelper userHelper)
 {
     this.votingRepository = votingRepository;
     this.userHelper       = userHelper;
 }
Example #10
0
 public MeetingController(IBusinessPartnerRepository BPrepo, IVotingRepository VotingRepo)
 {
     _BPrepo     = BPrepo;
     _VotingRepo = VotingRepo;
 }
 public VotingService(IUnitOfWork uow, IVotingRepository repository)
 {
     this.uow = uow;
     this.votingRepository = repository;
     logger = GlobalLogger.Logger;
 }
Example #12
0
 public VotingController(IVotingRepository votingRepository)
 {
     _votingRepository = votingRepository;
 }
Example #13
0
 public VotingsService(IVotingRepository votingRepository, ICategoryRepository categoryRepository)
 {
     _votingRepository   = votingRepository;
     _categoryRepository = categoryRepository;
 }
 public VoteController(IVotingRepository votingRepository)
 {
     _votingRepository = votingRepository;
 }
Example #15
0
 public VotingHub(ILogger <VotingHub> logger, IVotingRepository votingRepository, IUnitOfWork unitOfWork)
 {
     _logger           = logger;
     _votingRepository = votingRepository;
     _unitOfWork       = unitOfWork;
 }
Example #16
0
 public VotingController(IVotingRepository repo) => _repo = repo;
 public VotingManager(IVotingRepository votingRepository, IEmployeeRepository employeeRepository, IPresentRepository presentRepository)
 {
     this.votingRepository   = votingRepository;
     this.employeeRepository = employeeRepository;
     this.presentRepository  = presentRepository;
 }
Example #18
0
 public VotingService(IVotingRepository repo)
 {
     _repo = repo;
 }
 public VotingController(IVotingRepository votingRepository, IPostRepository postRepository, IUserRepository userRepository)
 {
     this.votingRepository = votingRepository;
     this.postRepository   = postRepository;
     this.userRepository   = userRepository;
 }
 public VideoGameVotingService(IVotingRepository votingRepository)
 {
     _votingRepository = votingRepository;
 }
Example #21
0
 public VotingService(IVotingRepository votingRepository, IUserRepository userRepository, ISieveProcessor sieveProcessor)
 {
     _votingRepository = votingRepository;
     _userRepository   = userRepository;
     _sieveProcessor   = sieveProcessor;
 }
 public VotingHub(ILogger<VotingHub> logger, IVotingRepository votingRepository, IUnitOfWork unitOfWork) 
 {
     _logger = logger;
     _votingRepository = votingRepository;
     _unitOfWork = unitOfWork;
 }