public void ConvertAnswersToQuestionsShouldHandleMissingQuestions()
 {
     CommentQuestionProcessor target = new CommentQuestionProcessor(m_AnswerRepo.Object);
     var extraInfos = m_infos.Concat(new[] { new CommentInfo { Id = 12345, IsQuestion = false, CreationDate = new DateTime(2010, 06, 29) } });
     target.ConvertAnswersToQuestions("site", extraInfos);
     //No assert, shouldn't crash
 }
 public void ConvertAnswersToQuestionsShouldUseCommentDate()
 {
     CommentQuestionProcessor target = new CommentQuestionProcessor(m_AnswerRepo.Object);
     var comments = target.ConvertAnswersToQuestions("site", m_infos);
     CollectionAssert.AreEquivalent(new []{
         new CommentInfo{Id = 21, CreationDate = new DateTime(2010, 06,21), IsQuestion = true},
         new CommentInfo{Id = 2, CreationDate = new DateTime(2010, 06,22), IsQuestion = true},
         new CommentInfo{Id = 23, CreationDate = new DateTime(2010, 06,23), IsQuestion = true},
         new CommentInfo{Id = 4, CreationDate = new DateTime(2010, 06,24), IsQuestion = true},
         new CommentInfo{Id = 25, CreationDate = new DateTime(2010, 06,25), IsQuestion = true},
     }, comments.ToList());
 }
 public void ConvertAnswersToQuestionsShouldRequestAnswerIds()
 {
     CommentQuestionProcessor target = new CommentQuestionProcessor(m_AnswerRepo.Object);
     target.ConvertAnswersToQuestions("site", m_infos);
     m_AnswerRepo.Verify(r=>r.Get("site", new []{1,3,5}));
 }