Esempio 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));
 }
Esempio 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));
        }
Esempio n. 3
0
 private void AddAddQuestionActivity(string userId, int questionId)
 {
     _unitOfWork.ActivityRepository.Add(
         Activity.ActivityAddQuestion(userId, questionId));
     _unitOfWork.Complete();
 }