<commit_before>﻿using System;
using System.Collections;
using Haarlemmertrekvaart.Configuration;
using NUnit.Framework;

namespace Haarlemmertrekvaart.UnitTests.Configuration
{
    public class ConnectionConfigurationTests
    {
        private ConnectionConfiguration _target;

        [SetUp]
        public void SetUp()
        {
            _target = new ConnectionConfiguration("x", "y");
        }

        [Test]
        public void ConnectionConfiguration_HttpHeaders_Contains_BasicAuthentication()
        {
            Assert.That(_target.HttpHeaders.GetHeader("Authorization"), Is.Not.Null);
        }

        [Test]
        public void ConnectionConfiguration_HttpHeaders_Are_Not_Null()
        {
            Assert.That(_target.HttpHeaders, Is.Not.Null);
        }

        [Test, TestCaseSource(typeof(ArgumentNullExceptionTestCases))]
        public void ConnectionConfiguration_Throws_ArgumentNullException_If_Args_Is_NullOrWhiteSpace(string username, string key)
        {
            Assert.That(() => new ConnectionConfiguration(username, key), Throws.TypeOf<ArgumentNullException>());
        }

        public class ArgumentNullExceptionTestCases : IEnumerable
        {
            public IEnumerator GetEnumerator()
            {
                yield return new TestCaseData("username", " ");
                yield return new TestCaseData(" ", " ");
                yield return new TestCaseData("", string.Empty);
                yield return new TestCaseData("username", string.Empty);
                yield return new TestCaseData(string.Empty, string.Empty);
                yield return new TestCaseData(string.Empty, "password");
                yield return new TestCaseData(string.Empty, "");
            }
        }
    }
}
<commit_msg>serialization - AcceptCharset header test<commit_after>﻿using System;
using System.Collections;
using Haarlemmertrekvaart.Configuration;
using NUnit.Framework;

namespace Haarlemmertrekvaart.UnitTests.Configuration
{
    public class ConnectionConfigurationTests
    {
        private ConnectionConfiguration _target;

        [SetUp]
        public void SetUp()
        {
            _target = new ConnectionConfiguration("x", "y");
        }

        [Test]
        public void ConnectionConfiguration_HttpHeaders_Contains_AcceptCharset()
        {
            Assert.That(_target.HttpHeaders.GetHeader("Accept-Charset"), Is.Not.Null);
        }

        [Test]
        public void ConnectionConfiguration_HttpHeaders_Contains_BasicAuthentication()
        {
            Assert.That(_target.HttpHeaders.GetHeader("Authorization"), Is.Not.Null);
        }

        [Test]
        public void ConnectionConfiguration_HttpHeaders_Are_Not_Null()
        {
            Assert.That(_target.HttpHeaders, Is.Not.Null);
        }

        [Test, TestCaseSource(typeof(ArgumentNullExceptionTestCases))]
        public void ConnectionConfiguration_Throws_ArgumentNullException_If_Args_Is_NullOrWhiteSpace(string username, string key)
        {
            Assert.That(() => new ConnectionConfiguration(username, key), Throws.TypeOf<ArgumentNullException>());
        }

        public class ArgumentNullExceptionTestCases : IEnumerable
        {
            public IEnumerator GetEnumerator()
            {
                yield return new TestCaseData("username", " ");
                yield return new TestCaseData(" ", " ");
                yield return new TestCaseData("", string.Empty);
                yield return new TestCaseData("username", string.Empty);
                yield return new TestCaseData(string.Empty, string.Empty);
                yield return new TestCaseData(string.Empty, "password");
                yield return new TestCaseData(string.Empty, "");
            }
        }
    }
}

{'fraction_non_alphanumeric': 0.0861611876988335, 'fraction_numerical': 0.0, 'mean_word_length': 2.4838411819021236, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '6649707', 'n_tokens_mistral': 931, 'n_tokens_neox': 913, 'n_words': 185}