public void AddResponse_CorrectResponseSubmitted_ReturnAddedResponseNotNull() { //ARRANGE var options = new DbContextOptionsBuilder().UseInMemoryDatabase(MethodBase.GetCurrentMethod().Name).Options; var context = new ApplicationContext(options); var repository = new ResponseRepository(context); var response = new Response { Question = new Question { Id = 1, Message = "Test question 1" }, DateOfResponse = DateTime.Now, IsDeleted = false, Responder = new ApplicationUser { Id = "aaaaabbbbbcccccdddd", Email = "*****@*****.**" } }; //ACT var result = repository.Insert(response); repository.Save(); //ASSERT Assert.IsNotNull(result); Assert.AreNotEqual(0, result.Id); }
public void DeleteResponse_CorrectResponseSubmitted_ThrowArgumentException() { //ARRANGE var options = new DbContextOptionsBuilder().UseInMemoryDatabase(MethodBase.GetCurrentMethod().Name).Options; var context = new ApplicationContext(options); var repository = new ResponseRepository(context); var response = new Response { Question = new Question { Id = 1, Message = "Test question 1" }, DateOfResponse = DateTime.Now, IsDeleted = false, Responder = new ApplicationUser { Id = "aaaaabbbbbcccccdddd", Email = "*****@*****.**" } }; var addedResponse = repository.Insert(response); context.SaveChanges(); //ACT var result = repository.Delete(addedResponse); repository.Save(); //ASSERT Assert.IsTrue(result); }
// POST api/<controller> //change data type into dynamic, so that it could be JSON public dynamic Post([FromBody] dynamic value) { ResponseRepository repo = new ResponseRepository(); repo.SaveResponse(value); return(value); }
//ActionResult is a combination of data and ... public ActionResult Index() { ResponseRepository repo = new ResponseRepository(); ViewBag.getResponse = repo.GetResponse(); return(View()); }
public void GetAllResponses_AddThreeNewResponsesThenRetrieveAddedResponses_ReturnCorrectNumberOfResponses() { //ARRANGE var options = new DbContextOptionsBuilder().UseInMemoryDatabase(MethodBase.GetCurrentMethod().Name).Options; var context = new ApplicationContext(options); var repository = new ResponseRepository(context); var repositoryQst = new QuestionRepository(context); //Question var question = new Question { Message = "Test question", PostDate = DateTime.Now, State = QuestionState.Waiting, IsDeleted = false }; var addedQuestion = repositoryQst.Insert(question); context.SaveChanges(); //Responses var response1 = new Response { Question = addedQuestion, DateOfResponse = DateTime.Now, IsDeleted = false, Responder = new ApplicationUser { Id = "aaaaabbbbbcccccdddd", Email = "*****@*****.**" } }; var response2 = new Response { Question = addedQuestion, DateOfResponse = DateTime.Now, IsDeleted = false, Responder = new ApplicationUser { Id = "bbbbbeeebcccccdddd", Email = "*****@*****.**" } }; var response3 = new Response { Question = addedQuestion, DateOfResponse = DateTime.Now, IsDeleted = false, Responder = new ApplicationUser { Id = "ccccbbbbbcccccdddd", Email = "*****@*****.**" } }; var addedResponse1 = repository.Insert(response1); var addedResponse2 = repository.Insert(response2); var addedResponse3 = repository.Insert(response3); context.SaveChanges(); //ACT var result = repository.GetAll(); //ASSERT Assert.IsNotNull(addedResponse1); Assert.IsNotNull(addedResponse2); Assert.IsNotNull(addedResponse3); Assert.AreEqual(3, result.Count()); }
static void Main(string[] args) { IResponseRepository responseRepository = new ResponseRepository(); var core = new Core.Background.WatcherService(responseRepository); core.GenerateResponse(); }
public void UpdateItemScore(ScoredResponse scoredResponse) { if (scoredResponse == null) { return; // Should probably log an error here if this were to happen. } ScorableTest scorableTest = ResponseRepository.UpdateItemScore(scoredResponse); }
public string GetTopBadStudents() { var students = ResponseRepository.GetRepository() .GetAllStudentWithMarks() .OrderBy(s => s.StudentSubjects.Sum(ss => ss.Mark)) .Take(5); return(GetStudentHtmlRows(students)); }
public void Initialize() { mock_context = new Mock <ResponseContext>(); mock_response_table = new Mock <DbSet <Response> >(); response_list = new List <Response>(); repo = new ResponseRepository(mock_context.Object); ConnectMocksToDatastore(); }
protected string GetTopBestStudents() { var students = ResponseRepository.GetRepository() .GetAllStudentWithMarks() .OrderByDescending(s => s.StudentSubjects.Sum(ss => ss.Mark)) .Take(5); return(GetStudentHtmlRows(students)); }
protected string GetPageData() { var yesData = ResponseRepository.GetRepository().GetAllResponses(); StringBuilder htmlStr = new StringBuilder(); foreach (var item in yesData) { htmlStr.Append(String.Format("<tr><td>{0}</td><td>{1}</td><td>{2}</td></tr>", item.FIO, item.PhoneNumber, item.ChosenRoomNumber)); } return(htmlStr.ToString()); }
public void DeleteResponse_NullResponseSubmitted_ThrowArgumentNullException() { //ARRANGE var options = new DbContextOptionsBuilder().UseInMemoryDatabase(MethodBase.GetCurrentMethod().Name).Options; var context = new ApplicationContext(options); var repository = new ResponseRepository(context); //ACT //ASSERT Assert.ThrowsException <ArgumentNullException>(() => repository.Delete(null)); }
public void ClearAllSavedResponses() { string destination = Application.persistentDataPath + "/responserepo.dat"; if (File.Exists(destination)) { File.Delete(destination); } LoadFile(); savedResponses = new ResponseRepository(); MenuController.s.m_fieldNotes.GetComponent <FieldNotesListDisplay>().showFieldNotes(savedResponses); }
protected string GetNoShowHtml() { StringBuilder html = new StringBuilder(); var noData = ResponseRepository.GetRepository().GetAllResponses().Where(r => !r.WillAttend.Value); foreach (var rsvp in noData) { html.Append(String.Format("<tr><td>{0}</td><td>{1}</td><td>{2}</td>", rsvp.Name, rsvp.Email, rsvp.Phone)); } return(html.ToString()); }
public void SetUp() { _ministryPlatformService = new Mock <IMinistryPlatformService>(); _authService = new Mock <IAuthenticationRepository>(); _configWrapper = new Mock <IConfigurationWrapper>(); _configWrapper.Setup(mocked => mocked.GetConfigIntValue("SignupToServeReminders")).Returns(2203); _configWrapper.Setup(m => m.GetEnvironmentVarAsString("API_USER")).Returns("uid"); _configWrapper.Setup(m => m.GetEnvironmentVarAsString("API_PASSWORD")).Returns("pwd"); _authService.Setup(m => m.Authenticate(It.IsAny <string>(), It.IsAny <string>())).Returns(new Dictionary <string, object> { { "token", "ABC" }, { "exp", "123" } }); _fixture = new ResponseRepository(_authService.Object, _configWrapper.Object, _ministryPlatformService.Object); }
public void Activate() { // the timer interval is in seconds so convert to milliseconds long interval = (ScoringDaemonSettings.HubTimerIntervalSeconds * 1000); const long startup = 5 * 1000; // Delaying first invocation by 30 seconds to allow the app to fully load _itemScoringTimer = new Timer(delegate { LastRun = DateTime.Now; try { // check if the item scoring configs need to be reloaded if (ItemScoringConf == null || DateTime.Now.Subtract(ItemScoringConf.LoadTime).TotalSeconds > ScoringDaemonSettings.ItemScoringConfigCacheSeconds) { // Reload the item scoring configs ItemScoringConf = ResponseRepository.GetItemScoringConfigs(); } //Get the items that can be rescored List <ScorableResponse> pendingResponses = ResponseRepository.GetScoreItems(ScoringDaemonSettings.PendingMins, ScoringDaemonSettings.MinAttempts, ScoringDaemonSettings.MaxAttempts, ScoringDaemonSettings.SessionType, ScoringDaemonSettings.MaxItemsReturned); int failures = ProcessPendingResponses(pendingResponses); if (failures > 0) { TDSLogger.Application.Error( new TraceLog(String.Format("Item Scoring: There were {0} out of {1} pending responses that could not be sent to rescore for {2}:{3}", failures, pendingResponses.Count, ClientName, Environment))); } //Get the items that have expired and need to marked as ScoringError and sent on their way List <ScorableResponse> expiredResponses = ResponseRepository.GetScoreItems(ScoringDaemonSettings.PendingMins, ScoringDaemonSettings.MaxAttempts + 1, 999, ScoringDaemonSettings.SessionType, ScoringDaemonSettings.MaxItemsReturned); failures = ProcessExpiredResponses(expiredResponses); if (failures > 0) { TDSLogger.Application.Error( new TraceLog(String.Format("Item Scoring: There were {0} out of {1} expired responses that failed to update in the DB for {2}:{3}", failures, expiredResponses.Count, ClientName, Environment))); } } catch (Exception ex) { string errorMessage = String.Format("Fatal exception occured on timer thread for {0}:{1}", ClientName, Environment); TDSLogger.Application.Fatal(new TraceLog("Application: " + errorMessage, ex)); } }, null, startup, interval); }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { Page.Validate(); if (!Page.IsValid) { return; } var student = new StudentResponse { FirstName = firstName.Text, LastName = lastName.Text, Email = email.Text, StudentSubjects = new List <StudentSubject> { new StudentSubject { SubjectId = 1, Mark = Convert.ToInt32(subject_1.Text) }, new StudentSubject { SubjectId = 2, Mark = Convert.ToInt32(subject_2.Text) }, new StudentSubject { SubjectId = 3, Mark = Convert.ToInt32(subject_3.Text) } } }; var repository = ResponseRepository.GetRepository(); try { repository.AddStudentWithResults(student); } catch (Exception ex) { Response.Redirect("Ошибка " + ex.Message); } Response.Redirect("successfuladdition.html"); } }
public void UpdateResponse_ResponseWithBadIdSubmitted_ThrowArgumentException() { //ARRANGE var options = new DbContextOptionsBuilder().UseInMemoryDatabase(MethodBase.GetCurrentMethod().Name).Options; var context = new ApplicationContext(options); var repository = new ResponseRepository(context); //ACT //ASSERT Assert.ThrowsException <ArgumentException>(() => repository.Update(new Response { Id = 0 })); Assert.ThrowsException <ArgumentException>(() => repository.Update(new Response { Id = -1 })); }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { GuestResponse rsvp = new GuestResponse(name.Text, email.Text, phone.Text, CheckBoxYN.Checked); ResponseRepository.GetRepository().AddResponse(rsvp); if (rsvp.WillAttend.HasValue && rsvp.WillAttend.Value) { Response.Redirect("seeyouthere.html"); } else { Response.Redirect("sorryyoucantcome.html"); } } }
protected void Page_Load(object sender, EventArgs e) { SetHotel(); if (IsPostBack) { GuestResponse rsvp = new GuestResponse(); if (TryUpdateModel(rsvp, new FormValueProvider(ModelBindingExecutionContext))) { ResponseRepository.GetRepository().AddResponse(rsvp); if (rsvp.ChosenRoomNumber != null && rsvp.FIO != null && rsvp.PhoneNumber != null) { hotel.SetRoomAvailability(rsvp.ChosenRoomNumber, false); Response.Redirect("ok.html"); } } } }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { Page.Validate(); if (!Page.IsValid) { return; } GuestResponse rsvp = new GuestResponse(name.Text, email.Text, phone.Text, CheckBoxYN.Checked); if (CheckBoxYN.Checked) { Report report1 = new Report(TextBoxTitle.Text, TextBoxTextAnnot.Text); rsvp.Reports.Add(report1); } if (TextBoxTitle2.Text != "" || TextBoxTextAnnot2.Text != "") { Report report2 = new Report(TextBoxTitle2.Text, TextBoxTextAnnot2.Text); rsvp.Reports.Add(report2); } try { SampleContext context = new SampleContext(); context.GuestResponses.Add(rsvp); context.SaveChanges(); } catch (Exception ex) { Response.Redirect("Ошибка " + ex.Message); } ResponseRepository.GetRepository().AddResponse(rsvp); if (rsvp.WillAttend.HasValue && rsvp.WillAttend.Value) { Response.Redirect("seeyouthere.html"); } else { Response.Redirect("sorryyoucantcome.html"); } } }
protected void Page_Load(object sender, EventArgs e) { //int j = 8; //int k = 0; //int i = j / k; // Создать объект Connection string connectionString = WebConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString; SqlConnection connection = new SqlConnection(connectionString); using (connection) { // Открыть соединение connection.Open(); Label1.Text = "<b>Версия сервера: </b>" + connection.ServerVersion; Label1.Text += "<br /><b>Состояние соединения: </b> " + connection.State.ToString(); } Label1.Text += "<br /><b>Состояние соединения после using: </b> " + connection.State.ToString(); this.Header.Title = WebConfigurationManager.AppSettings["websiteName"]; //txtHeader.Text = Header.Title; //txt1.Text = WebConfigurationManager.AppSettings["welcomeMessage"]; if (IsPostBack) { LoginResponse rsvp = new LoginResponse(); if (TryUpdateModel(rsvp, new FormValueProvider(ModelBindingExecutionContext))) { ResponseRepository.GetRepository().AddResponse(rsvp); if (rsvp.Sex == "Чоловіча") { Response.Redirect("male.html"); } else { Response.Redirect("female.html"); } } } }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { CarGuestResponse rsvp = new CarGuestResponse(); if (TryUpdateModel(rsvp, new FormValueProvider(ModelBindingExecutionContext))) { ResponseRepository.GetRepository().AddResponse(rsvp); if (rsvp.CarMark != null && rsvp.CarModel != null && rsvp.CivNumber != null && rsvp.Description != null && rsvp.FIO != null && rsvp.Phone != null) { Response.Redirect("ok.html"); } else { Response.Redirect("not_ok.html"); } } } }
public void AddResponse_AddANewResponse_ReturnFormResponseNotNull() { var options = new DbContextOptionsBuilder <EvaluationContext>() .UseInMemoryDatabase(databaseName: MethodBase.GetCurrentMethod().Name).Options; using (var context = new EvaluationContext(options)) { var repository = new ResponseRepository(context); var formResponse = new FormResponseTO { Date = DateTime.Now }; var result = repository.Add(formResponse); Assert.IsNotNull(result); Assert.AreNotEqual(0, result.Id); } }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { testGuestResponse rsvp = new testGuestResponse(); if (TryUpdateModel(rsvp, new FormValueProvider(ModelBindingExecutionContext))) { ResponseRepository.GetRepository().AddResponse(rsvp); if (rsvp.WillAttend.HasValue && rsvp.WillAttend.Value) { Response.Redirect("seeyouthere.html"); } else { Response.Redirect("sorryyoucantcome.html"); } } } }
public void UpdateResponse_CorrectResponseSubmitted_ReturnUpdatedResponse() { //ARRANGE var options = new DbContextOptionsBuilder().UseInMemoryDatabase(MethodBase.GetCurrentMethod().Name).Options; var context = new ApplicationContext(options); var repository = new ResponseRepository(context); var repositoryQst = new QuestionRepository(context); //Question var question = new Question { Message = "Test question", PostDate = DateTime.Now, State = QuestionState.Waiting, IsDeleted = false }; var addedQuestion = repositoryQst.Insert(question); context.SaveChanges(); //Responses var response = new Response { Question = addedQuestion, DateOfResponse = DateTime.Now, IsDeleted = false, Responder = new ApplicationUser { Id = "aaaaabbbbbcccccdddd", Email = "*****@*****.**" } }; var addedResponse = repository.Insert(response); context.SaveChanges(); //ACT addedResponse.IsDeleted = true; var result = repository.Update(addedResponse); repository.Save(); //ASSERT Assert.IsNotNull(result); Assert.IsTrue(result.IsDeleted); }
public void GetResponse_AddNewResponseThenRetrieveAddedResponse_ReturnAddedResponseNotNull() { //ARRANGE var options = new DbContextOptionsBuilder().UseInMemoryDatabase(MethodBase.GetCurrentMethod().Name).Options; var context = new ApplicationContext(options); var repository = new ResponseRepository(context); var repositoryQst = new QuestionRepository(context); //Question var question = new Question { Message = "Test question", PostDate = DateTime.Now, State = QuestionState.Waiting, IsDeleted = false }; var addedQuestion = repositoryQst.Insert(question); context.SaveChanges(); //Responses var response = new Response { Question = addedQuestion, DateOfResponse = DateTime.Now, IsDeleted = false, Responder = new ApplicationUser { Id = "aaaaabbbbbcccccdddd", Email = "*****@*****.**" } }; var addedResponse = repository.Insert(response); context.SaveChanges(); //ACT var result = repository.Get(addedResponse.Id); //ASSERT Assert.IsNotNull(addedResponse); Assert.AreNotEqual(0, addedResponse.Id); Assert.IsNotNull(result); Assert.AreEqual("aaaaabbbbbcccccdddd", result.Responder.Id); }
public void showFieldNotes(ResponseRepository notes) { fieldNotesListGrid.SetActive(true); detailPanel.SetActive(false); deleteButton.SetActive(true); //newButton.SetActive(true); returnButton.SetActive(false); foreach (Transform child in fieldNotesListGrid.transform) { Destroy(child.gameObject); } foreach (Response r in notes.responses) { Debug.Log("Creating a field note label"); GameObject label = GameObject.Instantiate(fieldNoteEntryPrefab); FieldNoteLabel components = label.GetComponent <FieldNoteLabel>(); components.dateText.text = r.date.ToString(); UnityEvent <Response> newEvent = new FieldNoteCallback(); newEvent.AddListener(showFieldNoteDetail); label.GetComponent <SelectableObjResponse>().response = r; label.GetComponent <SelectableObjResponse>().selectEventWithResponse = newEvent; label.transform.SetParent(fieldNotesListGrid.transform, false); } }
public void UpdateReponseWithCorrectParameter() { var options = new DbContextOptionsBuilder <EvaluationContext>() .UseInMemoryDatabase(databaseName: MethodBase.GetCurrentMethod().Name) .Options; using (var memoryContext = new EvaluationContext(options)) { //Arrange IFormRepository formRepository = new FormRepository(memoryContext); IResponseRepository responseRepository = new ResponseRepository(memoryContext); IQuestionRepository questionRepository = new QuestionRepository(memoryContext); ISubmissionRepository submissionRepository = new SubmissionRepository(memoryContext); IQuestionPropositionRepository questionPropositionRepository = new QuestionPropositionRepository(memoryContext); #region Form var Form1 = new FormTO { Name = new MultiLanguageString ( "Daily evaluation form", "Formulaire d'évaluation journalier", "Dagelijks evaluatieformulier" ), }; var formAdded1 = formRepository.Add(Form1); memoryContext.SaveChanges(); #endregion #region Questions var Question1 = new QuestionTO { FormId = formAdded1.Id, Position = 1, Libelle = new MultiLanguageString ( "What is your general impression after this first day of training ?", "Quelle est votre impression générale après cette première journée de formation ?", "Wat is je algemene indruk na deze eerste dag van training ?" ), Type = QuestionType.SingleChoice, }; var Question2 = new QuestionTO { FormId = formAdded1.Id, Position = 2, Libelle = new MultiLanguageString ( "Is the pace right for you ?", "Est-ce que le rythme vous convient ?", "Is het tempo geschikt voor u ?" ), Type = QuestionType.SingleChoice, }; var Question3 = new QuestionTO { FormId = formAdded1.Id, Position = 3, Libelle = new MultiLanguageString ( "Do you have questions related to the subject studied today ?", "Avez-vous des questions relatives à la matière étudiée aujourd’hui ?", "Heb je vragen over het onderwerp dat vandaag is bestudeerd ?" ), Type = QuestionType.Open }; var Question4 = new QuestionTO { FormId = formAdded1.Id, Position = 4, Libelle = new MultiLanguageString ( "Do you have specific questions / particular topics that you would like deepen during this training ?", "Avez-vous des questions spécifiques/sujets particuliers que vous aimeriez approfondir durant cette formation ?", "Heeft u specifieke vragen / specifieke onderwerpen die u graag zou willen verdiepen tijdens deze training ?" ), Type = QuestionType.Open }; var Question5 = new QuestionTO { FormId = formAdded1.Id, Position = 5, Libelle = new MultiLanguageString ( "What objectives do you pursue by following this training ?", "Quels objectifs poursuivez-vous en suivant cette formation ?", "Welke doelstellingen streeft u na door deze training te volgen?" ), Type = QuestionType.Open }; var questionAdded1 = questionRepository.Add(Question1); var questionAdded2 = questionRepository.Add(Question2); var questionAdded3 = questionRepository.Add(Question3); var questionAdded4 = questionRepository.Add(Question4); var questionAdded5 = questionRepository.Add(Question5); memoryContext.SaveChanges(); #endregion #region QuestionProposition var QuestionProposition1 = new QuestionPropositionTO { QuestionId = questionAdded1.Id, Libelle = new MultiLanguageString("good", "bonne", "goed"), Position = 1 }; var QuestionProposition2 = new QuestionPropositionTO { QuestionId = questionAdded1.Id, Libelle = new MultiLanguageString("medium", "moyenne", "gemiddelde"), Position = 2 }; var QuestionProposition3 = new QuestionPropositionTO { QuestionId = questionAdded1.Id, Libelle = new MultiLanguageString("bad", "mauvaise", "slecht"), Position = 3 }; var QuestionProposition4 = new QuestionPropositionTO { QuestionId = questionAdded2.Id, Libelle = new MultiLanguageString("yes", "oui", "ja"), Position = 1 }; var QuestionProposition5 = new QuestionPropositionTO { QuestionId = questionAdded2.Id, Libelle = new MultiLanguageString("too fast", "trop rapide", "te snel"), Position = 2 }; var QuestionProposition6 = new QuestionPropositionTO { QuestionId = questionAdded2.Id, Libelle = new MultiLanguageString("too slow", "trop lent", "te langzaam"), Position = 3 }; var questionPropositionAdded1 = questionPropositionRepository.Add(QuestionProposition1); var questionPropositionAdded2 = questionPropositionRepository.Add(QuestionProposition2); var questionPropositionAdded3 = questionPropositionRepository.Add(QuestionProposition3); var questionPropositionAdded4 = questionPropositionRepository.Add(QuestionProposition4); var questionPropositionAdded5 = questionPropositionRepository.Add(QuestionProposition5); var questionPropositionAdded6 = questionPropositionRepository.Add(QuestionProposition6); memoryContext.SaveChanges(); #endregion #region Submission var submission1 = new SubmissionTO { SessionId = 30, AttendeeId = 1012, Date = DateTime.Today, }; var submission2 = new SubmissionTO { SessionId = 31, AttendeeId = 2607, Date = DateTime.Today, }; var submission3 = new SubmissionTO { SessionId = 2, AttendeeId = 1612, Date = DateTime.Today, }; var submissionAdded1 = submissionRepository.Add(submission1); var submissionAdded2 = submissionRepository.Add(submission2); var submissionAdded3 = submissionRepository.Add(submission3); memoryContext.SaveChanges(); #endregion #region Responses var response1 = new ResponseTO { Question = questionAdded1, Submission = submissionAdded1, QuestionProposition = questionPropositionAdded1, }; var response2 = new ResponseTO { Question = questionAdded2, Submission = submissionAdded2, QuestionProposition = questionPropositionAdded2, }; var response3 = new ResponseTO { Question = questionAdded3, Submission = submissionAdded3, Text = "Ceci est une réponse à une question ouverte", //QuestionProposition = QuestionProposition3, }; var response4 = new ResponseTO { Question = questionAdded4, Submission = submissionAdded1, Text = "Ceci est une réponse à une question ouverte", }; //Assert var responseAdded1 = responseRepository.Add(response1); var responseAdded2 = responseRepository.Add(response2); var responseAdded3 = responseRepository.Add(response3); var responseAdded4 = responseRepository.Add(response4); memoryContext.SaveChanges(); #endregion //Act var result1 = responseRepository.Remove(responseAdded1); memoryContext.SaveChanges(); var submissionInjected = new SubmissionTO { AttendeeId = 007, Date = DateTime.Now, SessionId = 36 }; var responseToUpadate = new ResponseTO { Id = responseAdded2.Id, Question = questionAdded2, Submission = submissionInjected, QuestionProposition = questionPropositionAdded2, }; var result = responseRepository.Update(responseToUpadate); // Assert Assert.IsTrue(result1); Assert.AreEqual(36, result.Submission.SessionId); } }
public ResponseManager(SurveyContext context) { this.context = context; responseRepo = new ResponseRepository(this.context); }