Пример #1
0
        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);
        }
Пример #2
0
        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();
        }