<commit_before>﻿using System;
using System.Globalization;
using System.Linq;
using NUnit.Framework;

namespace BrightstarDB.Tests.EntityFramework
{
    [TestFixture]
    public class StringComparisonTests
    {
        private MyEntityContext _context;

        [TestFixtureSetUp]
        public void SetUp(TestContext context)
        {
            _context = new MyEntityContext("type=embedded;storesDirectory=" + Configuration.StoreLocation + ";storeName=EFStringComparisonTests_" + DateTime.Now.Ticks);
            var np = new Company {Name = "NetworkedPlanet"};
            var apple = new Company {Name = "Apple"};
            _context.Companies.Add(np);
            _context.Companies.Add(apple);
            _context.SaveChanges();
        }

        [Test]
        public void TestStartsWith()
        {
            var results = _context.Companies.Where(c => c.Name.StartsWith("Net")).ToList();
            Assert.AreEqual(1, results.Count);
            Assert.AreEqual("NetworkedPlanet",results[0].Name);

            results = _context.Companies.Where(c => c.Name.StartsWith("net", true, CultureInfo.CurrentCulture)).ToList();
            Assert.AreEqual(1, results.Count);
            Assert.AreEqual("NetworkedPlanet", results[0].Name);

            results = _context.Companies.Where(c => c.Name.StartsWith("net", false, CultureInfo.CurrentCulture)).ToList();
            Assert.AreEqual(0, results.Count);

            results = _context.Companies.Where(c => c.Name.StartsWith("net", StringComparison.CurrentCultureIgnoreCase)).ToList();
            Assert.AreEqual(1, results.Count);
            Assert.AreEqual("NetworkedPlanet", results[0].Name);

            results = _context.Companies.Where(c => c.Name.StartsWith("net", StringComparison.CurrentCulture)).ToList();
            Assert.AreEqual(0, results.Count);<commit_msg>Fixed SetUp() method signature<commit_after>﻿using System;
using System.Globalization;
using System.Linq;
using NUnit.Framework;

namespace BrightstarDB.Tests.EntityFramework
{
    [TestFixture]
    public class StringComparisonTests
    {
        private MyEntityContext _context;

        [TestFixtureSetUp]
        public void SetUp()
        {
            _context = new MyEntityContext("type=embedded;storesDirectory=" + Configuration.StoreLocation + ";storeName=EFStringComparisonTests_" + DateTime.Now.Ticks);
            var np = new Company {Name = "NetworkedPlanet"};
            var apple = new Company {Name = "Apple"};
            _context.Companies.Add(np);
            _context.Companies.Add(apple);
            _context.SaveChanges();
        }

        [Test]
        public void TestStartsWith()
        {
            var results = _context.Companies.Where(c => c.Name.StartsWith("Net")).ToList();
            Assert.AreEqual(1, results.Count);
            Assert.AreEqual("NetworkedPlanet",results[0].Name);

            results = _context.Companies.Where(c => c.Name.StartsWith("net", true, CultureInfo.CurrentCulture)).ToList();
            Assert.AreEqual(1, results.Count);
            Assert.AreEqual("NetworkedPlanet", results[0].Name);

            results = _context.Companies.Where(c => c.Name.StartsWith("net", false, CultureInfo.CurrentCulture)).ToList();
            Assert.AreEqual(0, results.Count);

            results = _context.Companies.Where(c => c.Name.StartsWith("net", StringComparison.CurrentCultureIgnoreCase)).ToList();
            Assert.AreEqual(1, results.Count);
            Assert.AreEqual("NetworkedPlanet", results[0].Name);

            results = _context.Companies.Where(c => c.Name.StartsWith("net", StringComparison.CurrentCulture)).ToList();
            Assert.AreEqual(0, results.Count);
{'fraction_non_alphanumeric': 0.1256771397616468, 'fraction_numerical': 0.004333694474539545, 'mean_word_length': 2.875131164742917, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '2770161', 'n_tokens_mistral': 1030, 'n_tokens_neox': 1007, 'n_words': 169}