<commit_before>﻿using System.Collections.Generic;

namespace YouTrackSharp.Tests.Infrastructure
{
    public class Connections
    {
        public static string ServerUrl 
            => "https://ytsharp.myjetbrains.com/youtrack/";
        
        public static Connection UnauthorizedConnection =>
            new BearerTokenConnection(ServerUrl, "invalidtoken");

        public static Connection Demo1Token => 
            new BearerTokenConnection(ServerUrl, "perm:ZGVtbzE=.WW91VHJhY2tTaGFycA==.AX3uf8RYk3y2bupWA1xyd9BhAHoAxc");
        
        public static Connection Demo2Token =>
            new BearerTokenConnection(ServerUrl, "perm:ZGVtbzI=.WW91VHJhY2tTaGFycA==.GQEOl33LyTtmJvhWuz0Q629wbo8dk0");

        public static Connection Demo3Token => 
            new BearerTokenConnection(ServerUrl, "perm:ZGVtbzM=.WW91VHJhY2tTaGFycA==.L04RdcCnjyW2UPCVg1qyb6dQflpzFy");

        public static class TestData
        {
            public static readonly List<object[]> ValidConnections
                = new List<object[]>
                {
                    new object[] { Demo1Token },
                    new object[] { Demo2Token }
                };
            
            public static readonly List<object[]> InvalidConnections
                = new List<object[]>
                {
                    new object[] { UnauthorizedConnection }
                };
        }
    }
} <commit_msg>Use TLS 1.2 for test suite<commit_after>﻿using System.Collections.Generic;
using System.Net.Http;
using System.Security.Authentication;

namespace YouTrackSharp.Tests.Infrastructure
{
    public class Connections
    {
        public static string ServerUrl 
            => "https://ytsharp.myjetbrains.com/youtrack/";
        
        public static Connection UnauthorizedConnection =>
            new BearerTokenConnection(ServerUrl, "invalidtoken", handler => ConfigureTestsHandler(handler));

        public static Connection Demo1Token => 
            new BearerTokenConnection(ServerUrl, "perm:ZGVtbzE=.WW91VHJhY2tTaGFycA==.AX3uf8RYk3y2bupWA1xyd9BhAHoAxc", handler => ConfigureTestsHandler(handler));
        
        public static Connection Demo2Token =>
            new BearerTokenConnection(ServerUrl, "perm:ZGVtbzI=.WW91VHJhY2tTaGFycA==.GQEOl33LyTtmJvhWuz0Q629wbo8dk0", handler => ConfigureTestsHandler(handler));

        public static Connection Demo3Token => 
            new BearerTokenConnection(ServerUrl, "perm:ZGVtbzM=.WW91VHJhY2tTaGFycA==.L04RdcCnjyW2UPCVg1qyb6dQflpzFy", handler => ConfigureTestsHandler(handler));

        public static class TestData
        {
            public static readonly List<object[]> ValidConnections
                = new List<object[]>
                {
                    new object[] { Demo1Token },
                    new object[] { Demo2Token }
                };
            
            public static readonly List<object[]> InvalidConnections
                = new List<object[]>
                {
                    new object[] { UnauthorizedConnection }
                };
        }
        
        private static void ConfigureTestsHandler(HttpClientHandler handler)
        {
            handler.SslProtocols = SslProtocols.Tls12;
        }
    }
} 
{'fraction_non_alphanumeric': 0.08149984505732878, 'fraction_numerical': 0.021691973969631236, 'mean_word_length': 2.2151394422310755, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 25, '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': '3952077', 'n_tokens_mistral': 991, 'n_tokens_neox': 915, 'n_words': 158}