<commit_before>﻿using System.IO;
using System.Xml.Linq;
using SomeBasicNHApp.Core;
using NHibernate;
using NUnit.Framework;
using Order = SomeBasicNHApp.Core.Entities.Order;
using System.Linq;
using SomeBasicNHApp.Core.Entities;

namespace SomeBasicNHApp.Tests
{
	[TestFixture]
    public class CustomerDataTests
    {

        private ISessionFactory _sessionFactory;

        private ISession _session;


        [Test]
        public void CanGetCustomerById()
        {
            var customer = _session.Get<Customer>(1);

            Assert.IsNotNull(customer);
        }

		[Test]
		public void CustomerHasOrders()
		{
			var customer = _session.Get<Customer>(1);

			Assert.True(customer.Orders.Any());
		}


		[Test]
        public void CanGetCustomerByFirstname()
        {
            var customers = _session.QueryOver<Customer>()
                .Where(c => c.Firstname == "Steve")
                .List<Customer>();<commit_msg>Products are part of orders<commit_after>﻿using System.IO;
using System.Xml.Linq;
using SomeBasicNHApp.Core;
using NHibernate;
using NUnit.Framework;
using Order = SomeBasicNHApp.Core.Entities.Order;
using System.Linq;
using SomeBasicNHApp.Core.Entities;

namespace SomeBasicNHApp.Tests
{
	[TestFixture]
    public class CustomerDataTests
    {

        private ISessionFactory _sessionFactory;

        private ISession _session;


        [Test]
        public void CanGetCustomerById()
        {
            var customer = _session.Get<Customer>(1);

            Assert.IsNotNull(customer);
        }

		[Test]
		public void CustomerHasOrders()
		{
			var customer = _session.Get<Customer>(1);

			Assert.True(customer.Orders.Any());
		}

		[Test]
		public void ProductsArePartOfOrders()
		{
			var product = _session.Get<Product>(1);

			Assert.True(product.Orders.Any());
		}

		[Test]
        public void CanGetCustomerByFirstname()
        {
            var customers = _session.QueryOver<Customer>()
                .Where(c => c.Firstname == "Steve")
                .List<Customer>();
{'fraction_non_alphanumeric': 0.10466830466830467, 'fraction_numerical': 0.002457002457002457, 'mean_word_length': 2.70856102003643, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 14, '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': '4119848', 'n_tokens_mistral': 648, 'n_tokens_neox': 592, 'n_words': 123}