Ejemplo n.º 1
0
 public void ActviityAddQuestion_QuestionIdIsZeroOrNegativeOrUserIdIsNull_ShouldThrowArgumentException()
 {
     Assert.Throws <ArgumentException>(() => Activity.ActivityAddQuestion("1", 0));
     Assert.Throws <ArgumentException>(() => Activity.ActivityAddQuestion("1", -1));
     Assert.Throws <ArgumentNullException>(() => Activity.ActivityFollowTopic(null, 1));
 }
Ejemplo n.º 2
0
        public static Activity AddTestActivityAddQuestionToDatabase(this iKnowContext context, int questionId)
        {
            var activity = Activity.ActivityAddQuestion(context.Users.First().Id, questionId);

            return(AddActivity(context, activity));
        }
Ejemplo n.º 3
0
 private void AddAddQuestionActivity(string userId, int questionId)
 {
     _unitOfWork.ActivityRepository.Add(
         Activity.ActivityAddQuestion(userId, questionId));
     _unitOfWork.Complete();
 }