<commit_before>using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
using Looker.RTL;
using Xunit;

namespace sdkrtl.Tests
{
    public class TransportTests
    {
        /**
         * These tests require the local Looker server is running and versions can be retrieved
         */
        private const string HtmlUrl = "https://github.com/looker-open-source/sdk-codegen";

        private const string HtmlContent = "One SDK to rule them all";
        private readonly TestConfig _config = new TestConfig();

        [Fact]
        public async Task GetHtmlUrlTest()
        {
            var xp = new Transport(_config.Settings);
            var actual = await xp.RawRequest(
                HttpMethod.Get,
                HtmlUrl
            );
            Assert.True(actual.Ok);
            Assert.Equal(HttpStatusCode.OK, actual.StatusCode);
            Assert.Contains("text/html", actual.ContentType);
            var content = actual.Body.ToString();
            Assert.NotNull(content);
            Assert.Contains(HtmlContent, content);
        }

        [Fact]
        public async Task GetJsonUrlTest()
        {
            var xp = new Transport(_config.Settings);
            var actual = await xp.RawRequest(
                HttpMethod.Get,
                "/versions"
            );
            Assert.True(actual.Ok);
            Assert.Equal(HttpStatusCode.OK, actual.StatusCode);
            Assert.Contains("application/json", actual.ContentType);
            var content = actual.Body.ToString();
            Assert.NotNull(content);
            Assert.Contains("looker_release_version", content);
            var json = JsonSerializer.Deserialize<Values>(content);
            Assert.Equal(json.Keys, new string[] {"looker_release_version", "current_version", "supported_versions"});
        }

        /**
         * This test requires the local Looker server is running and versions can be retrieved
         */
        [Fact]
        public async Task GetTypedUrlTest()
        {
            var xp = new Transport(_config.Settings);
            var actual = await xp.Request<Values, Exception>(
                HttpMethod.Get,
                "/versions"
            );
            Assert.True(actual.Ok);
            Assert.Equal(actual.Value.Keys,
                new string[] {"looker_release_version", "current_version", "supported_versions"});<commit_msg>Removed duplicate comment from unit test<commit_after>using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
using Looker.RTL;
using Xunit;

namespace sdkrtl.Tests
{
    public class TransportTests
    {
        /**
         * These tests require the local Looker server is running and versions can be retrieved
         */
        private const string HtmlUrl = "https://github.com/looker-open-source/sdk-codegen";

        private const string HtmlContent = "One SDK to rule them all";
        private readonly TestConfig _config = new TestConfig();

        [Fact]
        public async Task GetHtmlUrlTest()
        {
            var xp = new Transport(_config.Settings);
            var actual = await xp.RawRequest(
                HttpMethod.Get,
                HtmlUrl
            );
            Assert.True(actual.Ok);
            Assert.Equal(HttpStatusCode.OK, actual.StatusCode);
            Assert.Contains("text/html", actual.ContentType);
            var content = actual.Body.ToString();
            Assert.NotNull(content);
            Assert.Contains(HtmlContent, content);
        }

        [Fact]
        public async Task GetJsonUrlTest()
        {
            var xp = new Transport(_config.Settings);
            var actual = await xp.RawRequest(
                HttpMethod.Get,
                "/versions"
            );
            Assert.True(actual.Ok);
            Assert.Equal(HttpStatusCode.OK, actual.StatusCode);
            Assert.Contains("application/json", actual.ContentType);
            var content = actual.Body.ToString();
            Assert.NotNull(content);
            Assert.Contains("looker_release_version", content);
            var json = JsonSerializer.Deserialize<Values>(content);
            Assert.Equal(json.Keys, new string[] {"looker_release_version", "current_version", "supported_versions"});
        }

        [Fact]
        public async Task GetTypedUrlTest()
        {
            var xp = new Transport(_config.Settings);
            var actual = await xp.Request<Values, Exception>(
                HttpMethod.Get,
                "/versions"
            );
            Assert.True(actual.Ok);
            Assert.Equal(actual.Value.Keys,
                new string[] {"looker_release_version", "current_version", "supported_versions"});
{'fraction_non_alphanumeric': 0.09811165845648605, 'fraction_numerical': 0.0, 'mean_word_length': 1.9840783833435396, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7541635', 'n_tokens_mistral': 1224, 'n_tokens_neox': 1202, 'n_words': 298}