<commit_before>using System;
using System.Collections;
using NHibernate.Cfg;
using NHibernate.Dialect;
using NHibernate.Dialect.Function;
using NHibernate.Hql.Ast.ANTLR;
using NHibernate.Hql.Classic;
using NUnit.Framework;
using Environment = NHibernate.Cfg.Environment;

namespace NHibernate.Test.NHSpecificTest.NH645
{
	[TestFixture]
	public class HqlFunctionWithClassicParser : HQLFunctionFixtureBase
	{
		protected override void Configure(Configuration configuration)
		{
			base.Configure(configuration);
			configuration.SetProperty(Environment.QueryTranslator, typeof(ClassicQueryTranslatorFactory).AssemblyQualifiedName);
		}
	}

	[TestFixture]
	public class HqlFunctionWithAstHqlParser : HQLFunctionFixtureBase
	{
		protected override void Configure(Configuration configuration)
		{
			base.Configure(configuration);
			configuration.SetProperty(Environment.QueryTranslator, typeof(ASTQueryTranslatorFactory).AssemblyQualifiedName);
		}
	}

	public abstract class HQLFunctionFixtureBase : TestCase
	{
		private bool appliesToThisDialect = true;

		protected override string MappingsAssembly
		{
			get { return "NHibernate.Test"; }
		}

		protected override IList Mappings
		{
			get { return new[] { "HQL.Animal.hbm.xml", "HQL.MaterialResource.hbm.xml" }; }
		}

		protected override bool AppliesTo(Dialect.Dialect dialect)
		{
			return appliesToThisDialect;
		}

		protected override void Configure(Configuration configuration)
		{
			if (Dialect is MsSql2005Dialect)
				configuration.SetProperty(Environment.Dialect, typeof(CustomDialect).AssemblyQualifiedName);
			else
				appliesToThisDialect = false;
		}

		public void Run(string hql)
		{
			using (ISession s = OpenSession())
				try
				{
					s.CreateQuery(hql).List();<commit_msg>Tests: Fixed minor breakage due to namespace case change.<commit_after>using System;
using System.Collections;
using NHibernate.Cfg;
using NHibernate.Dialect;
using NHibernate.Dialect.Function;
using NHibernate.Hql.Ast.ANTLR;
using NHibernate.Hql.Classic;
using NUnit.Framework;
using Environment = NHibernate.Cfg.Environment;

namespace NHibernate.Test.NHSpecificTest.NH645
{
	[TestFixture]
	public class HqlFunctionWithClassicParser : HQLFunctionFixtureBase
	{
		protected override void Configure(Configuration configuration)
		{
			base.Configure(configuration);
			configuration.SetProperty(Environment.QueryTranslator, typeof(ClassicQueryTranslatorFactory).AssemblyQualifiedName);
		}
	}

	[TestFixture]
	public class HqlFunctionWithAstHqlParser : HQLFunctionFixtureBase
	{
		protected override void Configure(Configuration configuration)
		{
			base.Configure(configuration);
			configuration.SetProperty(Environment.QueryTranslator, typeof(ASTQueryTranslatorFactory).AssemblyQualifiedName);
		}
	}

	public abstract class HQLFunctionFixtureBase : TestCase
	{
		private bool appliesToThisDialect = true;

		protected override string MappingsAssembly
		{
			get { return "NHibernate.Test"; }
		}

		protected override IList Mappings
		{
			get { return new[] { "Hql.Animal.hbm.xml", "Hql.MaterialResource.hbm.xml" }; }
		}

		protected override bool AppliesTo(Dialect.Dialect dialect)
		{
			return appliesToThisDialect;
		}

		protected override void Configure(Configuration configuration)
		{
			if (Dialect is MsSql2005Dialect)
				configuration.SetProperty(Environment.Dialect, typeof(CustomDialect).AssemblyQualifiedName);
			else
				appliesToThisDialect = false;
		}

		public void Run(string hql)
		{
			using (ISession s = OpenSession())
				try
				{
					s.CreateQuery(hql).List();
{'fraction_non_alphanumeric': 0.08225352112676056, 'fraction_numerical': 0.003943661971830986, 'mean_word_length': 5.164930555555555, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '3521471', 'n_tokens_mistral': 1246, 'n_tokens_neox': 1062, 'n_words': 213}