<commit_before>﻿using ExpressionToCodeLib.Unstable_v2_Api;
// ReSharper disable ConvertToConstant.Local
// ReSharper disable RedundantEnumerableCastCall
// ReSharper disable MemberCanBeMadeStatic.Local
using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using ExpressionToCodeLib;

namespace ExpressionToCodeTest {
    [TestFixture]
    public class TestGenerics {
        [Test, Ignore("issue 13")]
        public void TypeParameters() {
            Assert.AreEqual(1337, StaticTestClass.Consume(12));
            Assert.AreEqual(42, StaticTestClass.Consume<int>(12));
            Assert.AreEqual(42, StaticTestClass.Consume('a'));
            Assert.AreEqual(42, StaticTestClass.IndirectConsume(12));

            Assert.AreEqual(
                @"() => 1337 == StaticTestClass.Consume(12)",
                ExpressionToCode.ToCode(() => 1337 == StaticTestClass.Consume(12))
                );
            Assert.AreEqual(<commit_msg>Enable last test case for issue 13<commit_after>﻿using ExpressionToCodeLib.Unstable_v2_Api;
// ReSharper disable ConvertToConstant.Local
// ReSharper disable RedundantEnumerableCastCall
// ReSharper disable MemberCanBeMadeStatic.Local
using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using ExpressionToCodeLib;

namespace ExpressionToCodeTest {
    [TestFixture]
    public class TestGenerics {
        [Test]
        public void TypeParameters() {
            Assert.AreEqual(1337, StaticTestClass.Consume(12));
            Assert.AreEqual(42, StaticTestClass.Consume<int>(12));
            Assert.AreEqual(42, StaticTestClass.Consume('a'));
            Assert.AreEqual(42, StaticTestClass.IndirectConsume(12));

            Assert.AreEqual(
                @"() => 1337 == StaticTestClass.Consume(12)",
                ExpressionToCode.ToCode(() => 1337 == StaticTestClass.Consume(12))
                );
            Assert.AreEqual(
{'fraction_non_alphanumeric': 0.10404920553562276, 'fraction_numerical': 0.03177857508969759, 'mean_word_length': 3.1798715203426124, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1679347', 'n_tokens_mistral': 599, 'n_tokens_neox': 539, 'n_words': 99}