Example #1
0
        public void It_uses_default_catalog_for_transport_addresses(string connectionString, string defaultCatalog)
        {
            var transport = new SqlServerTransport(connectionString)
            {
                DefaultCatalog = defaultCatalog
            };

#pragma warning disable CS0618 // Type or member is obsolete
            string transportAddress = transport.ToTransportAddress(new Transport.QueueAddress("endpointName", null, null, null));
#pragma warning restore CS0618 // Type or member is obsolete
            var catalogName = transportAddress.Split('@').Last();

            Assert.AreEqual($"[{defaultCatalog}]", catalogName);
        }