Exemplo n.º 1
0
        public void ParseValue_Encoded()
        {
            // arrange
            UrlType urlType = new UrlType();
            Uri     uri     = new Uri("http://domain.test/ä+😄?q=a/α");
            string  expectedLiteralValue = uri.AbsoluteUri;

            // act
            StringValueNode stringLiteral =
                (StringValueNode)urlType.ParseValue(uri);

            // assert
            Assert.Equal(expectedLiteralValue, stringLiteral.Value);
        }
Exemplo n.º 2
0
        public void ParseValue_Url()
        {
            // arrange
            var    urlType = new UrlType();
            var    uri     = new Uri("http://domain.test/url");
            string expectedLiteralValue = uri.AbsoluteUri;

            // act
            var stringLiteral =
                (StringValueNode)urlType.ParseValue(uri);

            // assert
            Assert.Equal(expectedLiteralValue, stringLiteral.Value);
        }