Ejemplo n.º 1
0
        public void InitializeTests()
        {
            this.mapper  = MockAutoMapper.GetAutoMapper();
            this.db      = MockDbContext.GetTestDb();
            this.service = new ParticipantRepliesService(this.db, this.mapper);

            var testQuestion = new Question()
            {
                Id = 1, Content = "First test", EventId = 1
            };

            db.Questions.Add(testQuestion);

            db.SaveChanges();
        }
Ejemplo n.º 2
0
        public void InitializeTests()
        {
            this.db = MockDbContext.GetTestDb();

            var question = new Question()
            {
                Id         = 1,
                AuthorName = "Pesho",
                EventId    = 1
            };

            this.db.Questions.Add(question);

            this.db.SaveChanges();

            this.service = new ManagerQuestionsService(this.db, null);
        }
Ejemplo n.º 3
0
        public void InitializeTests()
        {
            this.db     = MockDbContext.GetTestDb();
            this.mapper = MockAutoMapper.GetAutoMapper();

            var question = new Question()
            {
                Id         = 1,
                AuthorName = "Pesho",
                EventId    = 1,
                IsArchived = true
            };

            this.db.Questions.Add(question);

            this.db.SaveChanges();

            this.service = new ManagerQuestionsService(this.db, this.mapper);
        }
Ejemplo n.º 4
0
 public void InitializeTests()
 {
     this.db      = MockDbContext.GetTestDb();
     this.service = new ManagerSettingsService(this.db, null);
 }
Ejemplo n.º 5
0
 public void InitializeTests()
 {
     this.db      = MockDbContext.GetTestDb();
     this.mapper  = MockAutoMapper.GetAutoMapper();
     this.service = new ManagerSettingsService(this.db, this.mapper);
 }
Ejemplo n.º 6
0
        public void InitializeTests()
        {
            this.mapper  = MockAutoMapper.GetAutoMapper();
            this.db      = MockDbContext.GetTestDb();
            this.service = new ManagerPollsService(this.db, this.mapper);

            var testPollQuestion = new PollQuestion()
            {
                Id = 1, Content = "Are you ready?"
            };

            var testPollAnswers = new List <PollAnswer>()
            {
                new PollAnswer()
                {
                    Id = 1, Content = "Yes"
                },
                new PollAnswer()
                {
                    Id = 2, Content = "No"
                }
            };

            var testPoll = new Poll()
            {
                Id           = 99,
                EventId      = 1,
                PollQuestion = testPollQuestion,
                PollAnswers  = testPollAnswers,
                IsDeleted    = false,
                IsActive     = false
            };

            var testPollQuestion2 = new PollQuestion()
            {
                Id = 2, Content = "Are you ready again?"
            };

            var testPollAnswers2 = new List <PollAnswer>()
            {
                new PollAnswer()
                {
                    Id = 3, Content = "Yes"
                },
                new PollAnswer()
                {
                    Id = 4, Content = "No"
                }
            };

            var testPoll2 = new Poll()
            {
                Id           = 100,
                EventId      = 1,
                PollQuestion = testPollQuestion2,
                PollAnswers  = testPollAnswers2,
                IsDeleted    = false,
                IsActive     = false
            };

            db.Polls.AddRange(testPoll, testPoll2);
            db.SaveChanges();
        }
 public void InitializeTests()
 {
     this.db      = MockDbContext.GetTestDb();
     this.mapper  = MockAutoMapper.GetAutoMapper();
     this.service = new ParticipantEventsService(this.db, this.mapper);
 }