<commit_before>﻿using System;
using NUnit.Framework;
using Sharpy;
using Sharpy.Implementation.Generators;

namespace Tests.Generator {
    [TestFixture]
    public class DateByAge {
        [Test]
        public void RandomDateByAgeTwentyMinusOne() {
            //Will throw exception if argument is less than 0
            Assert.Throws<ArgumentException>(
                () => Sharpy.Generator.Create().Generate(generator => generator.DateByAge(-1)));
        }

        [Test]
        public void RandomDateByAgeTwentyYears() {
            var result = Sharpy.Generator.Create().Generate(generator => generator.DateByAge(20));

            Assert.AreEqual(result.Year, DateGenerator.CurrentLocalDate.Year - 20);
        }

        [Test]
        [Repeat(10)]
        public void RandomDateByAgeZeroYears() {
            var result = Sharpy.Generator.Create().Generate(generator => generator.DateByAge(0));
            //will make sure that the date created is earlier than today this year<commit_msg>Renames datebyage tests.<commit_after>﻿using System;
using NUnit.Framework;
using Sharpy;
using Sharpy.Implementation.Generators;

namespace Tests.Generator {
    [TestFixture]
    public class DateByAge {
        [Test]
        public void Arg_MinusOne() {
            //Will throw exception if argument is less than 0
            Assert.Throws<ArgumentException>(
                () => Sharpy.Generator.Create().Generate(generator => generator.DateByAge(-1)));
        }

        [Test]
        public void Arg_Twenty() {
            var result = Sharpy.Generator.Create().Generate(generator => generator.DateByAge(20));

            Assert.AreEqual(result.Year, DateGenerator.CurrentLocalDate.Year - 20);
        }

        [Test]
        [Repeat(10)]
        public void Arg_Zero() {
            var result = Sharpy.Generator.Create().Generate(generator => generator.DateByAge(0));
            //will make sure that the date created is earlier than today this year
{'fraction_non_alphanumeric': 0.10283687943262411, 'fraction_numerical': 0.00911854103343465, 'mean_word_length': 2.552158273381295, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '4199491', 'n_tokens_mistral': 542, 'n_tokens_neox': 506, 'n_words': 127}