Example #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));
 }
Example #2
0
        public static Activity AddTestActivityAddQuestionToDatabase(this iKnowContext context, int questionId)
        {
            var activity = Activity.ActivityAddQuestion(context.Users.First().Id, questionId);

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