<commit_before>﻿using System;
using System.Security.Cryptography;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Nardax.Tests
{
    [TestClass]
    public class DateTimeExtensionsTests
    {
        private DateTime _date;

        [TestInitialize]
        public void TestInitialize()
        {
            _date = new DateTime(1974, 7, 3);
        }

        [TestMethod]
        public void Floor_DateTimeWithSeconds_ReturnsHoursRoundedDowtToHours()
        {
            var expectedDateTime = new DateTime(1974, 7, 3, 11, 0, 0);

            _date = new DateTime(1974, 7, 3, 11, 10, 42);
            var timespan = new TimeSpan(0, 1, 0, 0);

            var actualDateTime = _date.Floor(timespan);

            Assert.AreEqual(expectedDateTime, actualDateTime);
        }

        [TestMethod]
        public void Round_DateTimeWithMinutes_ReturnsnDateTimeRoundedToNearestHours()
        {
            var expectedDateTime = new DateTime(1974, 7, 3, 11, 0, 0);

            _date = new DateTime(1974, 7, 3, 10, 35, 42);
            var timespan = new TimeSpan(0, 1, 0, 0);

            var actualDateTime = _date.Round(timespan);

            Assert.AreEqual(expectedDateTime, actualDateTime);
        }<commit_msg>Go bananas again<commit_after>﻿using System;
using System.Security.Cryptography;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Nardax.Tests
{
    [TestClass]
    public class DateTimeExtensionsTests
    {
        4, 7, 3);
        }

        [TestMethod]
        public void Floor_DateTimeWithSeconds_ReturnsHoursRoundedDowtToHours()
        {
            var expectedDateTime = new DateTime(1974, 7, 3, 11, 0, 0);

            _date = new DateTime(1974, 7, 3, 11, 10, 42);
            var timespan = new TimeSpan(0, 1, 0, 0);

            var actualDateTime = _date.Floor(timespan);

            Assert.AreEqual(expectedDateTime, actualDateTime);
        }

        [TestMethod]
        public void Round_DateTimeWithMinutes_ReturnsnDateTimeRoundedToNearestHours()
        {
            var expectedDateTime = new DateTime(1974, 7, 3, 11, 0, 0);

            _date = new DateTime(1974, 7, 3, 10, 35, 42);
            var timespan = new TimeSpan(0, 1, 0, 0);

            var actualDateTime = _date.Round(timespan);

            Assert.AreEqual(expectedDateTime, actualDateTime);
        }
{'fraction_non_alphanumeric': 0.09222886421861656, 'fraction_numerical': 0.04824935952177626, 'mean_word_length': 2.332859174964438, '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': '2360085', 'n_tokens_mistral': 777, 'n_tokens_neox': 657, 'n_words': 173}