public void InsertLearningMythQuizAttemptsTest() { var request = new List <LearningMythsQuizAttempts>(); _moklearningMythQuizAttempt.Setup(a => a.InsertAll(It.IsAny <List <LearningMythsQuizAttempts> >(), It.IsAny <string>())); _learningMythAdapter = new LearningMythsAdapter(_moklearningMythQuiz.Object, _moklearningMythQuizAttempt.Object, _settings.Object); var result = _learningMythAdapter.InsertLearningMythQuizAttempts(request); _moklearningMythQuizAttempt.Verify(a => a.InsertAll(It.IsAny <List <LearningMythsQuizAttempts> >(), It.IsAny <string>())); }
public void GetLatestIdTest() { var request = new List <LearningMythsQuizAttempts>(); _moklearningMythQuizAttempt.Setup(a => a.GetLatestId(It.IsAny <string>(), It.IsAny <SortDefinition <LearningMythsQuizAttempts> >())); _learningMythAdapter = new LearningMythsAdapter(_moklearningMythQuiz.Object, _moklearningMythQuizAttempt.Object, _settings.Object); var result = _learningMythAdapter.GetLatestId(); _moklearningMythQuizAttempt.Verify(a => a.GetLatestId(It.IsAny <string>(), It.IsAny <SortDefinition <LearningMythsQuizAttempts> >())); }
public void GetLearningMythsQuizzesTest() { var response = new List <BsonDocument> { new BsonDocument { } }; _moklearningMythQuiz.Setup(a => a.GetTotalRecords(It.IsAny <string>())).Returns(response); _learningMythAdapter = new LearningMythsAdapter(_moklearningMythQuiz.Object, _moklearningMythQuizAttempt.Object, _settings.Object); var result = _learningMythAdapter.GetLearningMythsQuizzes(); Assert.IsInstanceOf <List <LearningMythsQuiz> >(result); }
public void GetLatestAttemptByUserTest() { var response = new List <LearningMythsQuizAttempts> { new LearningMythsQuizAttempts { attemptcount = 1 } }; _moklearningMythQuizAttempt.Setup(a => a.GetData(It.IsAny <FilterDefinition <LearningMythsQuizAttempts> >(), It.IsAny <string>())); _learningMythAdapter = new LearningMythsAdapter(_moklearningMythQuiz.Object, _moklearningMythQuizAttempt.Object, _settings.Object); var result = _learningMythAdapter.GetLatestAttemptByUser(""); _moklearningMythQuizAttempt.Verify(a => a.GetData(It.IsAny <FilterDefinition <LearningMythsQuizAttempts> >(), It.IsAny <string>())); }