コード例 #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);
        }
コード例 #2
0
ファイル: UrlTypeTests.cs プロジェクト: zmarty/hotchocolate
        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);
        }