<commit_before>﻿using System;

using NUnit.Framework;

using NHibernate.Criterion;
using NHibernate.SqlCommand;

namespace NHibernate.Test.Criteria.Lambda
{
	[TestFixture]
	public class CriteriaAssertFixture : LambdaFixtureBase
	{
		private void AssertCriteriaAreNotEqual(ICriteria expected, ICriteria actual)
		{
			try
			{
				AssertCriteriaAreEqual(expected, actual);
				Assert.Fail("No exception thrown");
			}
			catch
			{
				Assert.Pass();
			}
		}

		private void AssertCriteriaAreNotEqual(DetachedCriteria expected, DetachedCriteria actual)
		{
			try
			{
				AssertCriteriaAreEqual(expected, actual);
				Assert.Fail("No exception thrown");
			}
			catch
			{
				Assert.Pass();
			}<commit_msg>Improve CriteriaAssertFixture (#2489)<commit_after>﻿using System;

using NUnit.Framework;

using NHibernate.Criterion;
using NHibernate.SqlCommand;

namespace NHibernate.Test.Criteria.Lambda
{
	[TestFixture]
	public class CriteriaAssertFixture : LambdaFixtureBase
	{
		private void AssertCriteriaAreNotEqual(ICriteria expected, ICriteria actual)
		{
			Assert.Throws<AssertionException>(
				() => { AssertCriteriaAreEqual(expected, actual); },
				"No exception thrown");
		}

		private void AssertCriteriaAreNotEqual(DetachedCriteria expected, DetachedCriteria actual)
		{
			Assert.Throws<AssertionException>(
				() => { AssertCriteriaAreEqual(expected, actual); },
				"No exception thrown");
{'fraction_non_alphanumeric': 0.0945945945945946, 'fraction_numerical': 0.002844950213371266, 'mean_word_length': 4.742857142857143, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '4625454', 'n_tokens_mistral': 492, 'n_tokens_neox': 409, 'n_words': 84}