Ejemplo n.º 1
0
        public async Task Add_ValidQuestion_ShouldCreateNewQuestion()
        {
            // arrange
            var fixture  = new Fixture();
            var question = fixture.Build <Core.CoreModels.Question>()
                           .Without(x => x.Id)
                           .Create();

            question.MemberId = 1;

            // act
            var questionId = await _repository.Add(question);

            // assert
            Assert.True(questionId > 0);
        }
Ejemplo n.º 2
0
 public ActionResult Create(Question question)
 {
     _questionsRepository.Add(question);
     return(RedirectToAction("Index"));
 }