public void NullUriIsSerializedIntoEmptyString()
        {
            UriConverter  converter     = new UriConverter();
            Uri?          uri           = null;
            StringBuilder stringBuilder = new StringBuilder();

            converter.AppendToStringBuilder(stringBuilder, CultureInfo.InvariantCulture, uri, null, ',');
            string serialized = stringBuilder.ToString();

            serialized.Should().Be("");
        }
        public void UriWithQuotesIsSerializedUsingEscapeCharacters()
        {
            UriConverter  converter     = new UriConverter();
            Uri           uri           = new Uri("http://localhost:3000/?x=\"");
            StringBuilder stringBuilder = new StringBuilder();

            converter.AppendToStringBuilder(stringBuilder, CultureInfo.InvariantCulture, uri, null, ',');
            string serialized = stringBuilder.ToString();

            serialized.Should().Be("\"http://localhost:3000/?x=\"\"\"");
        }
        public void UriSerializerIsValid()
        {
            UriConverter  converter     = new UriConverter();
            Uri           uri           = new Uri("http://localhost:3000/");
            StringBuilder stringBuilder = new StringBuilder();

            converter.AppendToStringBuilder(stringBuilder, CultureInfo.InvariantCulture, uri, null, ',');
            string serialized = stringBuilder.ToString();

            serialized.Should().Be("\"http://localhost:3000/\"");
        }