public void GetLatestIdTest() { var request = new List <GrowthMindsetQuizAttempts>(); _mokgrowthMindsetAttempt.Setup(a => a.GetLatestId(It.IsAny <string>(), It.IsAny <SortDefinition <GrowthMindsetQuizAttempts> >())); _growthMindsetAdapter = new GrowthMindsetAdapter(_mokgrowthMindsetQuiz.Object, _mokgrowthMindsetAttempt.Object, _settings.Object); var result = _growthMindsetAdapter.GetLatestId(); _mokgrowthMindsetAttempt.Setup(a => a.GetLatestId(It.IsAny <string>(), It.IsAny <SortDefinition <GrowthMindsetQuizAttempts> >())); }
public void InsertGrowthMindsetQuizTest() { var request = new GrowthMindsetQuiz(); _mokgrowthMindsetQuiz.Setup(a => a.InsertOne(It.IsAny <GrowthMindsetQuiz>(), It.IsAny <string>())); _growthMindsetAdapter = new GrowthMindsetAdapter(_mokgrowthMindsetQuiz.Object, _mokgrowthMindsetAttempt.Object, _settings.Object); var result = _growthMindsetAdapter.InsertGrowthMindsetQuiz(request); _mokgrowthMindsetQuiz.Verify(a => a.InsertOne(It.IsAny <GrowthMindsetQuiz>(), It.IsAny <string>())); }
public void InsertGrowthMindsetQuizAttemptsTest() { var request = new List <GrowthMindsetQuizAttempts>(); _mokgrowthMindsetAttempt.Setup(a => a.InsertAll(It.IsAny <List <GrowthMindsetQuizAttempts> >(), It.IsAny <string>())); _growthMindsetAdapter = new GrowthMindsetAdapter(_mokgrowthMindsetQuiz.Object, _mokgrowthMindsetAttempt.Object, _settings.Object); var result = _growthMindsetAdapter.InsertGrowthMindsetQuizAttempts(request); _mokgrowthMindsetAttempt.Setup(a => a.InsertAll(It.IsAny <List <GrowthMindsetQuizAttempts> >(), It.IsAny <string>())); }
public void GetGrowthMindsetQuizTest() { var response = new List <BsonDocument> { new BsonDocument { } }; _mokgrowthMindsetQuiz.Setup(a => a.GetTotalRecords(It.IsAny <string>())).Returns(response); _growthMindsetAdapter = new GrowthMindsetAdapter(_mokgrowthMindsetQuiz.Object, _mokgrowthMindsetAttempt.Object, _settings.Object); var result = _growthMindsetAdapter.GetGrowthMindsetQuiz(); Assert.IsInstanceOf <List <GrowthMindsetQuiz> >(result); }
public void GetLatestAttemptByUserTest() { var response = new List <GrowthMindsetQuizAttempts> { new GrowthMindsetQuizAttempts { attemptcount = 1 } }; _mokgrowthMindsetAttempt.Setup(a => a.GetData(It.IsAny <FilterDefinition <GrowthMindsetQuizAttempts> >(), It.IsAny <string>())); _growthMindsetAdapter = new GrowthMindsetAdapter(_mokgrowthMindsetQuiz.Object, _mokgrowthMindsetAttempt.Object, _settings.Object); var result = _growthMindsetAdapter.GetLatestAttemptByUser(""); _mokgrowthMindsetAttempt.Verify(a => a.GetData(It.IsAny <FilterDefinition <GrowthMindsetQuizAttempts> >(), It.IsAny <string>())); }