public void WindowsSecurityTest()
        {
            IConnectionString connectionString = new NpgsqlConnectionString()
            {
                Host               = "127.0.0.1",
                Port               = 5432,
                Database           = "myDataBase",
                IntegratedSecurity = true
            };

            string expected = "Server=127.0.0.1;Port=5432;Database=myDataBase;Integrated Security=true;";
            string actual   = connectionString.GenerateConnectionString();

            Assert.Equal(expected, actual);
        }
        public void StandardTest()
        {
            IConnectionString connectionString = new NpgsqlConnectionString()
            {
                Host     = "127.0.0.1",
                Port     = 5432,
                Database = "myDataBase",
                UserId   = "myUsername",
                Password = "******"
            };

            string expected = "Server=127.0.0.1;Port=5432;Database=myDataBase;User Id=myUsername;Password=myPassword;";
            string actual   = connectionString.GenerateConnectionString();

            Assert.Equal(expected, actual);
        }
        public void SSLTest()
        {
            IConnectionString connectionString = new NpgsqlConnectionString()
            {
                Host     = "127.0.0.1",
                Port     = 5432,
                Database = "myDataBase",
                UserId   = "myUsername",
                Password = "******",
                Protocol = 3,
                SSL      = true,
                SSLMode  = NpgsqlConnectionString.SslMode.Require
            };

            string expected = "Server=127.0.0.1;Port=5432;Database=myDataBase;User Id=myUsername;Password=myPassword;Protocol=3;SSL=true;SslMode=Require;";
            string actual   = connectionString.GenerateConnectionString();

            Assert.Equal(expected, actual);
        }
        public void PoolingTest()
        {
            IConnectionString connectionString = new NpgsqlConnectionString()
            {
                Host               = "127.0.0.1",
                Port               = 5432,
                Database           = "myDataBase",
                UserId             = "myUsername",
                Password           = "******",
                Protocol           = 3,
                Pooling            = true,
                MinPoolSize        = 1,
                MaxPoolSize        = 20,
                ConnectionLifeTime = 15
            };

            string expected = "Server=127.0.0.1;Port=5432;Database=myDataBase;User Id=myUsername;Password=myPassword;Protocol=3;Pooling=true;MinPoolSize=1;MaxPoolSize=20;ConnectionLifeTime=15;";
            string actual   = connectionString.GenerateConnectionString();

            Assert.Equal(expected, actual);
        }