<commit_before>using System;
using System.Collections;
using NUnit.Framework;

namespace NHibernate.Test.NHSpecificTest.NH1857
{
	[TestFixture]
	public class FullJoinTest : BugTestCase
	{
		protected override void OnSetUp()
		{
			base.OnSetUp();
			using (ISession session = OpenSession())
			{
				var e1 = new Employee(1, "Employee1", new DateTime(1995, 1, 1));
				var e2 = new Employee(2, "Employee2", new DateTime(2007, 8, 1));
				var e3 = new Employee(3, "Employee3", new DateTime(2009, 5, 1));

				var d1 = new Department(1, "Department S");

				d1.AddEmployee(e1);
				d1.AddEmployee(e2);

				session.SaveOrUpdate(d1);
				session.SaveOrUpdate(e1);
				session.SaveOrUpdate(e2);
				session.SaveOrUpdate(e3);

				session.Flush();
			}
		}

		protected override void OnTearDown()
		{
			base.OnTearDown();
			using (ISession session = OpenSession())
			using (ITransaction t = session.BeginTransaction())
			{
				session.CreateQuery("delete from Employee").ExecuteUpdate();
				session.CreateQuery("delete from Department").ExecuteUpdate();
				t.Commit();
			}
		}

		protected override bool AppliesTo(Dialect.Dialect dialect)
		{
			return TestDialect.GetTestDialect(dialect).SupportsFullJoin;
		}

		[Test]
		public void TestFullJoin()
		{
			using (ISession s = OpenSession())
			{
				IQuery q = s.CreateQuery("from Employee as e full join e.Department");

				IList result = q.List();

				Assert.AreEqual(3, result.Count);
			}
		}
	}
}
<commit_msg>NH-1857 - Ignore test for MySqlDialect as MySql does not support full joins<commit_after>using System;
using System.Collections;
using NHibernate.Dialect;
using NUnit.Framework;

namespace NHibernate.Test.NHSpecificTest.NH1857
{
	[TestFixture]
	public class FullJoinTest : BugTestCase
	{
		protected override void OnSetUp()
		{
			using (var session = OpenSession())
			using (var transaction = session.BeginTransaction())
			{
				var e1 = new Employee(1, "Employee1", new DateTime(1995, 1, 1));
				var e2 = new Employee(2, "Employee2", new DateTime(2007, 8, 1));
				var e3 = new Employee(3, "Employee3", new DateTime(2009, 5, 1));

				var d1 = new Department(1, "Department S");

				d1.AddEmployee(e1);
				d1.AddEmployee(e2);

				session.SaveOrUpdate(d1);
				session.SaveOrUpdate(e1);
				session.SaveOrUpdate(e2);
				session.SaveOrUpdate(e3);

				transaction.Commit();
			}
		}

		protected override void OnTearDown()
		{
			using (var session = OpenSession())
			using (var transaction = session.BeginTransaction())
			{
				session.CreateQuery("delete from Employee").ExecuteUpdate();
				session.CreateQuery("delete from Department").ExecuteUpdate();
				transaction.Commit();
			}
		}

		protected override bool AppliesTo(Dialect.Dialect dialect)
		{
			if (dialect is MySQLDialect)
				return false;
			if (dialect is InformixDialect)
				return false;
			if (dialect is SQLiteDialect)
				return false;

			return true;
		}

		[Test]
		public void TestFullJoin()
		{
			using (var session = OpenSession())
			using (session.BeginTransaction())
			{
				var q = session.CreateQuery("from Employee as e full join e.Department");

				var result = q.List();

				Assert.AreEqual(3, result.Count);
			}
		}
	}
}

{'fraction_non_alphanumeric': 0.11711711711711711, 'fraction_numerical': 0.026426426426426425, 'mean_word_length': 3.0375757575757576, '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': '4261502', 'n_tokens_mistral': 1359, 'n_tokens_neox': 1057, 'n_words': 257}