<commit_before>﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;
using Codentia.Common.Data;
using Codentia.Common.Data.Provider;
using NUnit.Framework;
using TestContext = Codentia.Common.Data.Test.Context.TestContext;

namespace Codentia.Common.Data.Test
{
    /// <summary>
    /// Unit Tests for DbContext base object
    /// </summary>
    [TestFixture]
    public class DbContextTest
    {
        // TODO: dbinterface tests seem to fail after this; it's like we are leaving a connection open but not sure how

        /// <summary>
        /// Tests the fixture tear down.
        /// </summary>
        [TestFixtureTearDown]
        public void TestFixtureTearDown()
        {
            // ensure context is disposed
            new TestContext().Dispose();
        }

        /// <summary>
        /// Create a default instance, using config
        /// </summary>
        [Test]
        public void _001_Create_FromConfig()<commit_msg>Move DbContext Tests to end to avoid clash<commit_after>﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;
using Codentia.Common.Data;
using Codentia.Common.Data.Provider;
using NUnit.Framework;
using TestContext = Codentia.Common.Data.Test.Context.TestContext;

namespace Codentia.Common.Data.Test
{
    /// <summary>
    /// Unit Tests for DbContext base object
    /// </summary>
    [TestFixture]
    public class zDbContextTest
    {
        // TODO: DbInterface tests fail if run immediately after this, so add a 'z' to the name for the moment
        // Believe this is just because the setup is done in DbInterface and when we remove that it'll be OK

        /// <summary>
        /// Tests the fixture tear down.
        /// </summary>
        [TestFixtureTearDown]
        public void TestFixtureTearDown()
        {
            // ensure context is disposed
            new TestContext().Dispose();
        }

        /// <summary>
        /// Create a default instance, using config
        /// </summary>
        [Test]
        public void _001_Create_FromConfig()
{'fraction_non_alphanumeric': 0.09916589434661724, 'fraction_numerical': 0.0027803521779425394, 'mean_word_length': 2.306278713629403, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '6783276', 'n_tokens_mistral': 606, 'n_tokens_neox': 579, 'n_words': 188}