<commit_before>﻿using System;
using System.IO;

namespace QTFK
{
    public static class Asserts
    {
        public static void IsFilled(string someString, string exceptionMessageFormat, params object[] messageParams)
        {
            assertIsFilled(someString, exceptionMessageFormat, messageParams);
        }

        public static void IsInstance<T>(T item, string exceptionMessageFormat, params object[] messageParams) where T : class
        {
            assert(item != null, exceptionMessageFormat, messageParams);
        }

        public static void IsValidEnum<T>(T enumValue, string exceptionMessageFormat, params object[] messageParams) where T : struct
        {
            assert(Enum.IsDefined(typeof(T), enumValue), exceptionMessageFormat, messageParams);
        }

        public static void IsValidEnum<T>(string enumValue, string exceptionMessageFormat, params object[] messageParams) where T : struct
        {
            assertIsFilled(enumValue, exceptionMessageFormat, messageParams);
            assert(Enum.IsDefined(typeof(T), enumValue), exceptionMessageFormat, messageParams);
        }

        public static void IsGreaterThanZero(int value, string exceptionMessageFormat, params object[] messageParams)
        {
            assert(value > 0, exceptionMessageFormat, messageParams);
        }

        public static void IsGreaterThanZero(long value, string exceptionMessageFormat, params object[] messageParams)
        {
            assert(value > 0, exceptionMessageFormat, messageParams);
        }

        public static void IsGreaterThanZero(double value, string exceptionMessageFormat, params object[] messageParams)
        {
            assert(value > 0.0, exceptionMessageFormat, messageParams);
        }

        public static void IsGreaterThanZero(decimal value, string exceptionMessageFormat, params object[] messageParams)
        {
            assert(value > 0m, exceptionMessageFormat, messageParams);
        }

        public static void FileExists(string filePath, string exceptionMessageFormat, params object[] messageParams)
        {
            assertIsFilled(filePath, exceptionMessageFormat, messageParams);
            assert(File.Exists(filePath), exceptionMessageFormat, messageParams);
        }

        public static void IsTrue(bool condition, string exceptionMessageFormat, params object[] messageParams)
        {<commit_msg>Renamed Asserts.IsTrue method to Asserts.Check<commit_after>﻿using System;
using System.IO;

namespace QTFK
{
    public static class Asserts
    {
        public static void IsFilled(string someString, string exceptionMessageFormat, params object[] messageParams)
        {
            assertIsFilled(someString, exceptionMessageFormat, messageParams);
        }

        public static void IsInstance<T>(T item, string exceptionMessageFormat, params object[] messageParams) where T : class
        {
            assert(item != null, exceptionMessageFormat, messageParams);
        }

        public static void IsValidEnum<T>(T enumValue, string exceptionMessageFormat, params object[] messageParams) where T : struct
        {
            assert(Enum.IsDefined(typeof(T), enumValue), exceptionMessageFormat, messageParams);
        }

        public static void IsValidEnum<T>(string enumValue, string exceptionMessageFormat, params object[] messageParams) where T : struct
        {
            assertIsFilled(enumValue, exceptionMessageFormat, messageParams);
            assert(Enum.IsDefined(typeof(T), enumValue), exceptionMessageFormat, messageParams);
        }

        public static void IsGreaterThanZero(int value, string exceptionMessageFormat, params object[] messageParams)
        {
            assert(value > 0, exceptionMessageFormat, messageParams);
        }

        public static void IsGreaterThanZero(long value, string exceptionMessageFormat, params object[] messageParams)
        {
            assert(value > 0, exceptionMessageFormat, messageParams);
        }

        public static void IsGreaterThanZero(double value, string exceptionMessageFormat, params object[] messageParams)
        {
            assert(value > 0.0, exceptionMessageFormat, messageParams);
        }

        public static void IsGreaterThanZero(decimal value, string exceptionMessageFormat, params object[] messageParams)
        {
            assert(value > 0m, exceptionMessageFormat, messageParams);
        }

        public static void FileExists(string filePath, string exceptionMessageFormat, params object[] messageParams)
        {
            assertIsFilled(filePath, exceptionMessageFormat, messageParams);
            assert(File.Exists(filePath), exceptionMessageFormat, messageParams);
        }

        public static void Check(bool condition, string exceptionMessageFormat, params object[] messageParams)
        {
{'fraction_non_alphanumeric': 0.07228418009087154, 'fraction_numerical': 0.0020652622883106154, 'mean_word_length': 3.193073593073593, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, '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': '1959482', 'n_tokens_mistral': 1131, 'n_tokens_neox': 1103, 'n_words': 322}