Exemple #1
0
        public void It_accepts_connection_string_with_catalog_property(string connectionString)
        {
            var transport = new SqlServerTransport(connectionString);

            transport.ParseConnectionAttributes();

            Assert.AreEqual("my.catalog", transport.Catalog);
        }
Exemple #2
0
        public void It_overrides_catalog_with_default_catalog(string connectionString, string defaultCatalog)
        {
            var transport = new SqlServerTransport(connectionString)
            {
                DefaultCatalog = defaultCatalog
            };

            // Confirm Catalog is not set prior to parsing.
            Assert.IsNull(transport.Catalog);

            transport.ParseConnectionAttributes();

            Assert.AreEqual(defaultCatalog, transport.Catalog);
        }