<commit_before>﻿using System;
using SolidWorks.Interop.sldworks;
using Xunit;

namespace SwCSharpAddinSpecHelper
{
    [Collection("SwPool")]
    public abstract class SolidWorksSpec : IDisposable
    {
        private readonly SwPoolFixture _Pool;
        protected SldWorks App;

        protected SolidWorksSpec(SwPoolFixture pool)
        {
            _Pool = pool;
            App = _Pool.Acquire();
        }

        public void Dispose()
        {
            _Pool.Release(App);
        }
    }

    public class SwPoolFixture : IDisposable
    {
        private readonly Pool<SldWorks> _Instances = new Pool<SldWorks>(() => new SldWorks { Visible = true });

        public SldWorks Acquire()
        {
            return _Instances.Acquire();
        }

        public void Release(SldWorks instance)<commit_msg>Don't show SW window in tests<commit_after>﻿using System;
using SolidWorks.Interop.sldworks;
using Xunit;

namespace SwCSharpAddinSpecHelper
{
    [Collection("SwPool")]
    public abstract class SolidWorksSpec : IDisposable
    {
        private readonly SwPoolFixture _Pool;
        protected SldWorks App;

        protected SolidWorksSpec(SwPoolFixture pool)
        {
            _Pool = pool;
            App = _Pool.Acquire();
        }

        public void Dispose()
        {
            _Pool.Release(App);
        }
    }

    public class SwPoolFixture : IDisposable
    {
        private readonly Pool<SldWorks> _Instances = new Pool<SldWorks>(() => new SldWorks { Visible = false });

        public SldWorks Acquire()
        {
            return _Instances.Acquire();
        }

        public void Release(SldWorks instance)
{'fraction_non_alphanumeric': 0.08108108108108109, 'fraction_numerical': 0.0, 'mean_word_length': 2.167300380228137, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '6600924', 'n_tokens_mistral': 504, 'n_tokens_neox': 461, 'n_words': 114}