public void ShouldGetAllFavouritesFromFavouritesCollection() { // Arrange var cookies = new FakeCookie(true); httpContextAccessor.Setup(_ => _.HttpContext.Request.Cookies).Returns(cookies); httpContextAccessor.Setup(_ => _.HttpContext.Response.Cookies).Returns(cookies); // Act var favourites = cookiesHelper.GetCookies <Group>("favourites"); // Assert favourites.Should().HaveCount(3); }
private void AccountLogger_OnAcceptListener(CookieContainer session, string phoneNumber) { Logger.LogMessage(this, phoneNumber + " successfully approved."); tempSessions.Add(phoneNumber + ":" + CookiesHelper.GetCookies(session)); var item = lstAccounts.FindItemWithText(phoneNumber); item.SubItems[1].Text = "Accepted"; item.BackColor = Color.Green; var commentSender = new CommentSender(this, session, inputs.Posts, inputs.Comments, phoneNumber); commentSender.Execute(); }