<commit_before>﻿namespace King.ATrak.Test
{
    using King.ATrak;
    using NUnit.Framework;
    using System;

    [TestFixture]
    public class ContentTypesTests
    {
        [Test]
        [ExpectedException(typeof(ArgumentException))]
        public void ContentTypeFilePathInvalid()
        {
            ContentTypes.ContentType(null);
        }

        [Test]
        [ExpectedException(typeof(InvalidOperationException))]
        public void ContentTypeFilePathWierd()
        {
            ContentTypes.ContentType(". ");
        }

        [TestCase("image/jpeg", ".jpg")]
        [TestCase("text/css", ".css")]
        [TestCase("image/png", ".png")]
        [TestCase("image/x-icon", ".ico")]
        [TestCase("text/plain", ".txt")]
        public void Types(string expected, string extension)
        {
            Assert.AreEqual(expected, ContentTypes.ContentType(extension));
        }

        [TestCase("image/jpeg", ".jpg")]
        [TestCase("text/css", ".css")]
        [TestCase("image/png", ".png")]
        [TestCase("image/x-icon", ".ico")]
        [TestCase("text/plain", ".txt")]
        public void TypesCached(string expected, string extension)
        {
            Assert.AreEqual(expected, ContentTypes.ContentType(extension));
            Assert.AreEqual(expected, ContentTypes.ContentType(extension));
            Assert.AreEqual(expected, ContentTypes.ContentType(extension));
        }
    }
}<commit_msg>test case<commit_after>﻿namespace King.ATrak.Test
{
    using King.ATrak;
    using NUnit.Framework;
    using System;

    [TestFixture]
    public class ContentTypesTests
    {
        [Test]
        [ExpectedException(typeof(ArgumentException))]
        public void ContentTypeFilePathInvalid()
        {
            ContentTypes.ContentType(null);
        }

        [Test]
        [ExpectedException(typeof(InvalidOperationException))]
        public void ContentTypeFilePathWierd()
        {
            ContentTypes.ContentType(". ");
        }

        [TestCase("image/jpeg", ".jpg")]
        [TestCase("text/css", ".css")]
        [TestCase("image/png", ".png")]
        [TestCase("image/x-icon", ".ico")]
        [TestCase("text/plain", ".txt")]
        [TestCase("", ".jrnl")]
        public void Types(string expected, string extension)
        {
            Assert.AreEqual(expected, ContentTypes.ContentType(extension));
        }

        [TestCase("image/jpeg", ".jpg")]
        [TestCase("text/css", ".css")]
        [TestCase("image/png", ".png")]
        [TestCase("image/x-icon", ".ico")]
        [TestCase("text/plain", ".txt")]
        public void TypesCached(string expected, string extension)
        {
            Assert.AreEqual(expected, ContentTypes.ContentType(extension));
            Assert.AreEqual(expected, ContentTypes.ContentType(extension));
            Assert.AreEqual(expected, ContentTypes.ContentType(extension));
        }
    }
}
{'fraction_non_alphanumeric': 0.14461960246744346, 'fraction_numerical': 0.0, 'mean_word_length': 2.3823870220162227, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6421148', 'n_tokens_mistral': 783, 'n_tokens_neox': 763, 'n_words': 131}