Esempio n. 1
0
        public void InsertStoryTellingForImpactQuizzAttemptsTest()
        {
            var request             = new List <StoryTellingForImpactQuizAttempts>();
            var getLatestIdResponse = new StoryTellingForImpactQuizAttempts();

            _mokstoryTellingForImpactQuizAttempt.Setup(a => a.InsertAll(It.IsAny <List <StoryTellingForImpactQuizAttempts> >(), It.IsAny <string>()));

            _storyTellingForImpactQuizAdapter = new StoryTellingForImpactAdapter(_mokstoryTellingForImpactQuiz.Object, _settings.Object, _mokstoryTellingForImpactQuizAttempt.Object);

            var result = _storyTellingForImpactQuizAdapter.InsertStoryTellingForImpactQuizzAttempts(request);

            _mokstoryTellingForImpactQuizAttempt.Verify(a => a.InsertAll(It.IsAny <List <StoryTellingForImpactQuizAttempts> >(), It.IsAny <string>()));
        }
Esempio n. 2
0
        public void GetLatestAttemptByUserTest()
        {
            var request             = new List <StoryTellingForImpactQuizAttempts>();
            var getLatestIdResponse = new StoryTellingForImpactQuizAttempts();

            _mokstoryTellingForImpactQuizAttempt.Setup(a => a.GetData(It.IsAny <FilterDefinition <StoryTellingForImpactQuizAttempts> >(), It.IsAny <string>()));

            _storyTellingForImpactQuizAdapter = new StoryTellingForImpactAdapter(_mokstoryTellingForImpactQuiz.Object, _settings.Object, _mokstoryTellingForImpactQuizAttempt.Object);

            var result = _storyTellingForImpactQuizAdapter.GetLatestAttemptByUser("");

            _mokstoryTellingForImpactQuizAttempt.Verify(a => a.GetData(It.IsAny <FilterDefinition <StoryTellingForImpactQuizAttempts> >(), It.IsAny <string>()));
        }
Esempio n. 3
0
        public void GetStoryTellingForImpactQuizzesTest()
        {
            var response            = new List <BsonDocument>();
            var getLatestIdResponse = new StoryTellingForImpactQuizAttempts();

            _mokstoryTellingForImpactQuiz.Setup(a => a.GetTotalRecords(It.IsAny <string>())).Returns(response);

            _storyTellingForImpactQuizAdapter = new StoryTellingForImpactAdapter(_mokstoryTellingForImpactQuiz.Object, _settings.Object, _mokstoryTellingForImpactQuizAttempt.Object);

            var result = _storyTellingForImpactQuizAdapter.GetStoryTellingForImpactQuizzes();

            Assert.IsInstanceOf <List <StoryTellingForImpactQuiz> >(result);
        }