public void WhenGettingDeviceCapabilitiesFromInvalidCookie_ThenInvalidOperationExceptionIsThrown()
        {
            var cookieValue = "test";
            var cookie = new HttpCookie("profile", cookieValue);
            var encoder = new ProfileCookieEncoder();

            Assert.Throws<InvalidOperationException>(() => encoder.GetDeviceCapabilities(cookie));
        }
        public void WhenGettingDeviceCapabilitiesFromValidCookie_ThenCapabilitiesDictionaryIsReturned()
        {
            var cookieValue = "{'id':'generic','version':'1.1','json':'1','width':'865','height':'500','clr':'24'}";
            var cookie = new HttpCookie("profile", cookieValue);
            var encoder = new ProfileCookieEncoder();

            var capabilities = encoder.GetDeviceCapabilities(cookie);

            Assert.Equal(6, capabilities.Count);
        }