<commit_before>﻿using System;
using Xunit;

namespace Humanizer.Tests
{
    public class StringExtensionsTests
    {
        private const string format = "This is a format with three numbers: {0}-{1}-{2}.";
        private const string expected = "This is a format with three numbers: 1-2-3.";

        [Fact]
        public void CanFormatStringWithExactNumberOfArguments()
        {
            string actual = format.FormatWith(1, 2, 3);

            Assert.Equal(expected, actual);
        }

        [Fact]
        public void CanFormatStringWithMoreArguments()
        {
            string actual = format.FormatWith(1, 2, 3, 4, 5);

            Assert.Equal(expected, actual);
        }

        [Fact]
        public void CannotFormatStringWithLessArguments()
        {
            Assert.Throws<FormatException>(() => format.FormatWith(1, 2));
        }
    }
}<commit_msg>Added a missing unit test for StringExentions<commit_after>﻿using System;
using Xunit;

namespace Humanizer.Tests
{
    public class StringExtensionsTests
    {
        private const string format = "This is a format with three numbers: {0}-{1}-{2}.";
        private const string expected = "This is a format with three numbers: 1-2-3.";

        [Fact]
        public void CanFormatStringWithExactNumberOfArguments()
        {
            string actual = format.FormatWith(1, 2, 3);

            Assert.Equal(expected, actual);
        }

        [Fact]
        public void CanFormatStringWithMoreArguments()
        {
            string actual = format.FormatWith(1, 2, 3, 4, 5);

            Assert.Equal(expected, actual);
        }

        [Fact]
        public void CannotFormatStringWithLessArguments()
        {
            Assert.Throws<FormatException>(() => format.FormatWith(1, 2));
        }

        [Fact]
        public void FormatCannotBeNull()
        {
            string format = null;
            Assert.Throws<ArgumentNullException>(() => format.FormatWith(1, 2));
        }
    }
}
{'fraction_non_alphanumeric': 0.10261569416498995, 'fraction_numerical': 0.01710261569416499, 'mean_word_length': 2.0981308411214954, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 9, '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': '3390904', 'n_tokens_mistral': 559, 'n_tokens_neox': 527, 'n_words': 144}