public void MakingTimeForMeQuizController_saveMakingTimeForMeQuiz() { //Act var actual = new MakingTimeForMeQuizController(_makingTimeForMeQuizBusinessLogic.Object); var makingTimeForMeQuiz = new MakingTimeForMeQuiz(); var target = actual.saveMakingTimeForMeQuiz(makingTimeForMeQuiz); //Assert Assert.IsNotNull(target); Assert.AreEqual(200, ((ObjectResult)target).StatusCode); }
public void InsertMakingTimeForMeQuizTest() { var request = new MakingTimeForMeQuiz(); _mokmakingTimeForMeQuiz.Setup(a => a.InsertOne(It.IsAny <MakingTimeForMeQuiz>(), It.IsAny <string>())); _makingTimeForMeQuizAdapter = new MakingTimeForMeQuizAdapter(_mokmakingTimeForMeQuiz.Object, _mokmakingTimeForMeQuizAttempt.Object, _settings.Object); var result = _makingTimeForMeQuizAdapter.InsertMakingTimeForMeQuiz(request); _mokmakingTimeForMeQuiz.Verify(a => a.InsertOne(It.IsAny <MakingTimeForMeQuiz>(), It.IsAny <string>())); }
public List <MakingTimeForMeQuiz> ReadMakingTimeQuiz(ExcelWorksheet worksheet, string action) { List <MakingTimeForMeQuiz> makingTimeQuizzes = new List <MakingTimeForMeQuiz>(); var id = 1; for (var rowNumber = 2; rowNumber <= worksheet.Dimension.End.Row; rowNumber++) { var row = worksheet.Cells[rowNumber, 1, rowNumber, worksheet.Dimension.End.Column]; MakingTimeForMeQuiz question = new MakingTimeForMeQuiz { scores = new Score() }; var columnNumber = 0; foreach (var cell in row) { switch (columnNumber) { case 0: question.question = cell.Text; break; case 1: question.scores.always = Convert.ToInt32(cell.Text?.Trim()); break; case 2: question.scores.often = Convert.ToInt32(cell.Text?.Trim()); break; case 3: question.scores.sometimes = Convert.ToInt32(cell.Text?.Trim()); break; case 4: question.scores.rarely = Convert.ToInt32(cell.Text?.Trim()); break; case 5: question.scores.never = Convert.ToInt32(cell.Text?.Trim()); break; } columnNumber++; } question.id = id; question.updatetimestamp = DateTime.Now.ToString(CultureInfo.InvariantCulture); makingTimeQuizzes.Add(question); id++; } return(makingTimeQuizzes); }
public void ReflectionToolController_SaveReflectionToolQuizAttempt() { //Act var actual = new ReflectionToolController(_reflectionToolBusinessLogics.Object); var makingTimeForMeQuiz = new MakingTimeForMeQuiz(); List <ReflectionToolQuizAttempt> reflectionToolQuizAttempt = new List <ReflectionToolQuizAttempt>(); { } actual.SaveReflectionToolQuizAttempt(reflectionToolQuizAttempt); //Assert Assert.IsNotNull(actual); }
public int InsertMakingTimeForMeQuiz(MakingTimeForMeQuiz makingTimeForMeQuiz) { _makingTimeForMeQuiz.InsertOne(makingTimeForMeQuiz, _makingTimeForMeQuizCollection); return(1); }
public int InsertMakingTimeForMeQuizzes(MakingTimeForMeQuiz makingTimeForMeQuiz) { return(_makingTimeForMeQuizAdapter.InsertMakingTimeForMeQuiz(makingTimeForMeQuiz)); }
public IActionResult saveMakingTimeForMeQuiz([FromBody] MakingTimeForMeQuiz makingTimeForMeQuiz) { return(Ok(_makingTimeForMeQuizBusinessLogic.InsertMakingTimeForMeQuizzes(makingTimeForMeQuiz))); }