Untitled

 avatar
unknown
plain_text
a month ago
1.0 kB
5
Indexable
[Test]
        [Category("P1")]
        [Description("Verify GetUserAgent returns a valid HbbTV user agent string in proper format")]
        [Property("SPEC", "Tizen.TV.DataService.HbbTV.HbbtvApi.GetUserAgent M")]
        public static void GetUserAgent_ValidFormat_P()
        {
            string userAgent = HbbtvApi.GetUserAgent();

            // Verify the user agent string is not null or empty
            Assert.NotNull(userAgent, "GetUserAgent returned null");
            Assert.IsNotEmpty(userAgent, "GetUserAgent returned empty string");

            // Verify the user agent string contains "HbbTV" identifier (standard HbbTV UA format)
            Assert.IsTrue(userAgent.Contains("HbbTV"),
                $"User agent string does not contain 'HbbTV' identifier. Actual: '{userAgent}'");

            // Verify the user agent string has a reasonable minimum length
            Assert.Greater(userAgent.Length, 5,
                $"User agent string is unexpectedly short. Actual: '{userAgent}'");
        }
Editor is loading...
Leave a Comment