<commit_before>﻿using HumbleConfig.KeyFormatters;
using NUnit.Framework;
using Ploeh.AutoFixture;

namespace HumbleConfig.Tests.KeyFormatters
{
    public class KeyPrefixerTests
    {
        private KeyPrefixer _formatter;
        private string _key;
        private string _formattedKey;
        private string _prefix;

        [OneTimeSetUp]
        public void GivenAKeyPrefixer()
        {
            _prefix = new Fixture().Create<string>();
            _formatter = new KeyPrefixer(_prefix);
        }

        [SetUp]
        public void WhenFormattingTheKey()
        {
            _key = new Fixture().Create<string>();
            _formattedKey = _formatter.FormatKey(_key);
        }

        [Test]
        public void ThenTheKeyIsPrefixed()
        {
            Assert.That(_formattedKey, Does.EndWith(_prefix));
        }

        [Test]
        public void ThenTheFormattedKeyEndWithTheKey()<commit_msg>Fixing mistake in test after upgrading NUnit.<commit_after>﻿using HumbleConfig.KeyFormatters;
using NUnit.Framework;
using Ploeh.AutoFixture;

namespace HumbleConfig.Tests.KeyFormatters
{
    public class KeyPrefixerTests
    {
        private KeyPrefixer _formatter;
        private string _key;
        private string _formattedKey;
        private string _prefix;

        [OneTimeSetUp]
        public void GivenAKeyPrefixer()
        {
            _prefix = new Fixture().Create<string>();
            _formatter = new KeyPrefixer(_prefix);
        }

        [SetUp]
        public void WhenFormattingTheKey()
        {
            _key = new Fixture().Create<string>();
            _formattedKey = _formatter.FormatKey(_key);
        }

        [Test]
        public void ThenTheKeyIsPrefixed()
        {
            Assert.That(_formattedKey, Does.StartWith(_prefix));
        }

        [Test]
        public void ThenTheFormattedKeyEndWithTheKey()
{'fraction_non_alphanumeric': 0.08031914893617022, 'fraction_numerical': 0.0, 'mean_word_length': 2.1989795918367347, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2649230', 'n_tokens_mistral': 523, 'n_tokens_neox': 506, 'n_words': 109}