public void ParseCookieValue_ShouldIgnoreInvalidCookie() { // Arrange var expected = new List <int>(); var cookieValue = "ThisIsABadCookie"; // Act var actual = CookiePagesViewedProvider.ParseCookieValue(cookieValue); // Assert CollectionAssert.AreEqual(expected, actual); }
public void ParseCookieValue_ShouldParseEmptyValue() { // Arrange var expected = new List <int>(); var cookieValue = string.Empty; // Act var actual = CookiePagesViewedProvider.ParseCookieValue(cookieValue); // Assert CollectionAssert.AreEqual(expected, actual); }
public void ParseCookieValue_ShouldRemoveInvalidValuesFromCookie() { // Arrange var expected = new List <int> { 1, 2, 3, 4 }; var cookieValue = "1,invalid,2,3,####,4,@!@!"; // Act var actual = CookiePagesViewedProvider.ParseCookieValue(cookieValue); // Assert CollectionAssert.AreEqual(expected, actual); }
public void ParseCookieValue_ShouldParseValidCookie() { // Arrange var expected = new List <int> { 1, 2, 3, 4 }; var cookieValue = "1,2,3,4"; // Act var actual = CookiePagesViewedProvider.ParseCookieValue(cookieValue); // Assert CollectionAssert.AreEqual(expected, actual); }