<commit_before>﻿using System;
using NUnit.Framework;
using TreeGecko.Library.Common.Helpers;

namespace tgTests.Common.Helpers
{
    [TestFixture]
    public class DateHelperTests
    {
        [Test]
        public void ParseDateTime()
        {
            DateTime now = new DateTime();
            string nowString = now.ToString("o");

            DateTime outputDateTime = DateHelper.ParseDateTimeString(nowString);

            Assert.AreEqual(now, outputDateTime);
        }

        [Test]
        public void ParseDateTimeNull()
        {
            try
            {
                DateTime outputDateTime = DateHelper.ParseDateTimeString(null);
            }
            catch (Exception ex)
            {
                Assert.IsInstanceOf<ArgumentNullException>(ex);
            }
        }

        [Test]
        public void ParseString()
        {
            DateTime time = DateTime.UtcNow;

            DateTime? value = DateHelper.ParseDate(time.ToShortDateString());

            Assert.IsNotNull(value);
        }

        [Test]
        public void ParseDateTimeUFormat()
        {
            DateTime now = new DateTime();
            string nowString = now.ToString("u");

            DateTime outputDateTime = DateHelper.ParseDateTimeString(nowString);

            Assert.AreEqual(now, outputDateTime);
        }
    }
}
<commit_msg>additional tests<commit_after>﻿using System;
using NUnit.Framework;
using TreeGecko.Library.Common.Helpers;

namespace tgTests.Common.Helpers
{
    [TestFixture]
    public class DateHelperTests
    {
        [Test]
        public void ParseDateTime()
        {
            DateTime now = new DateTime();
            string nowString = now.ToString("o");

            DateTime outputDateTime = DateHelper.ParseDateTimeString(nowString);

            Assert.AreEqual(now, outputDateTime);
        }

        [Test]
        public void ParseDateTimeNull()
        {
            try
            {
                DateTime outputDateTime = DateHelper.ParseDateTimeString(null);
                Assert.Fail("Should have had an exception");
            }
            catch (Exception ex)
            {
                Assert.IsInstanceOf<ArgumentNullException>(ex);
            }
        }

        [Test]
        public void ParseDateTimeNow()
        {
            DateTime outputDateTime = DateHelper.ParseDateTimeString("now");
        }

        [Test]
        public void ParseDateTimeToday()
        {
            DateTime outputDateTime = DateHelper.ParseDateTimeString("today");
        }

        [Test]
        public void ParseDateTimeYesterday()
        {
            DateTime outputDateTime = DateHelper.ParseDateTimeString("yesterday");
        }

        [Test]
        public void ParseDateTimeTomorrow()
        {
            DateTime outputDateTime = DateHelper.ParseDateTimeString("tomorrow");
        }

        [Test]
        public void ParseString()
        {
            DateTime time = DateTime.UtcNow;

            DateTime? value = DateHelper.ParseDate(time.ToShortDateString());

            Assert.IsNotNull(value);
        }

        [Test]
        public void ParseDateTimeUFormat()
        {
            DateTime now = new DateTime();
            string nowString = now.ToString("u");

            DateTime outputDateTime = DateHelper.ParseDateTimeString(nowString);

            Assert.AreEqual(now, outputDateTime);
        }
    }
}

{'fraction_non_alphanumeric': 0.08576429404900816, 'fraction_numerical': 0.0, 'mean_word_length': 1.7475961538461537, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1076097', 'n_tokens_mistral': 841, 'n_tokens_neox': 811, 'n_words': 168}