<commit_before>using System;

using NUnit.Framework;

namespace MongoDB.Driver.Connections
{
    [TestFixture]
    public class TestConnectionFactory
    {
        [TearDown]
        public void TearDown (){
            ConnectionFactory.Shutdown ();
        }

        [Test]
        public void TestGetConnection (){
            var connection1 = ConnectionFactory.GetConnection (string.Empty);
            var connection2 = ConnectionFactory.GetConnection (string.Empty);
            Assert.IsNotNull (connection1);
            Assert.IsNotNull (connection2);
            Assert.AreEqual (1, ConnectionFactory.PoolCount);
        }

        [Test]
        public void TestCreatePoolForEachUniqeConnectionString (){
            ConnectionFactory.GetConnection (string.Empty);
            ConnectionFactory.GetConnection (string.Empty);
            ConnectionFactory.GetConnection ("Username=test");
            ConnectionFactory.GetConnection ("Username=test");
            ConnectionFactory.GetConnection ("Server=localhost");
            Assert.AreEqual (3, ConnectionFactory.PoolCount);
        }
        
        [Test]
        public void TestGetInvalidConnection (){
            bool thrown = false;
            try{
                ConnectionFactory.GetConnection("MinimumPoolSize=50; MaximumPoolSize=10");
            }catch(ArgumentException){
                thrown = true;
            }catch(Exception){
                Assert.Fail("Wrong exception thrown");
            }
        }
    }
}
<commit_msg>Fix compiler warning and rename test to be more clear.<commit_after>using System;

using NUnit.Framework;

namespace MongoDB.Driver.Connections
{
    [TestFixture]
    public class TestConnectionFactory
    {
        [TearDown]
        public void TearDown (){
            ConnectionFactory.Shutdown ();
        }

        [Test]
        public void TestGetConnection (){
            var connection1 = ConnectionFactory.GetConnection (string.Empty);
            var connection2 = ConnectionFactory.GetConnection (string.Empty);
            Assert.IsNotNull (connection1);
            Assert.IsNotNull (connection2);
            Assert.AreEqual (1, ConnectionFactory.PoolCount);
        }

        [Test]
        public void TestCreatePoolForEachUniqeConnectionString (){
            ConnectionFactory.GetConnection (string.Empty);
            ConnectionFactory.GetConnection (string.Empty);
            ConnectionFactory.GetConnection ("Username=test");
            ConnectionFactory.GetConnection ("Username=test");
            ConnectionFactory.GetConnection ("Server=localhost");
            Assert.AreEqual (3, ConnectionFactory.PoolCount);
        }
        
        [Test]
        public void TestExceptionWhenMinimumPoolSizeIsGreaterThenMaximumPoolSize (){
            try{
                ConnectionFactory.GetConnection("MinimumPoolSize=50; MaximumPoolSize=10");
            }catch(ArgumentException){
            }catch(Exception){
                Assert.Fail("Wrong exception thrown");
            }
        }
    }
}

{'fraction_non_alphanumeric': 0.08452950558213716, 'fraction_numerical': 0.006379585326953748, 'mean_word_length': 2.021194605009634, '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': '3222587', 'n_tokens_mistral': 744, 'n_tokens_neox': 709, 'n_words': 140}