Пример #1
0
        public VotesServiceTests()
        {
            this.db = BaseServiceTests.CreateContext();

            var votesRepository = new EfRepository <Vote>(this.db);

            this.service = new VotesService(votesRepository);
        }
Пример #2
0
        public UsersServiceTests()
        {
            this.db = BaseServiceTests.CreateContext();

            var commentsRepository = new EfDeletableEntityRepository <ApplicationUser>(this.db);

            this.service = new UsersService(commentsRepository);
        }
        public CommentServiceTests()
        {
            this.db          = BaseServiceTests.CreateContext();
            this.mockService = new Mock <ICommentsService>();

            var commentsRepository = new EfDeletableEntityRepository <Comment>(this.db);

            this.service = new CommentsService(commentsRepository);
        }
Пример #4
0
        public ExercisesServiceTest()
        {
            this.db          = BaseServiceTests.CreateContext();
            this.mockService = new Mock <IExercisesService>();

            var exercisesRepository = new EfDeletableEntityRepository <Exercise>(this.db);

            this.service = new ExercisesService(exercisesRepository);
        }
Пример #5
0
        public DietsServiceTests()
        {
            this.db          = BaseServiceTests.CreateContext();
            this.mockService = new Mock <IDietsService>();

            var dietsRepository = new EfDeletableEntityRepository <Diet>(this.db);
            var userRepository  = new EfDeletableEntityRepository <ApplicationUser>(this.db);

            this.service = new DietsService(dietsRepository, userRepository);
        }