Esempio n. 1
0
        public void Get_SqlNCli10Dot1_OleDbConnection()
        {
            var connStr = "Provider=SQLNCLI10.1;Data Source=ds;Initial Catalog=ic;Integrated Security=SSPI;";
            var actual  = new OleDbClientFactory().Instantiate(connStr);

            Assert.That(actual, Is.InstanceOf <DbClient>());
            Assert.That(actual.ConnectionString, Is.EqualTo(connStr));
            var conn = actual.CreateNew();

            Assert.That(conn, Is.InstanceOf <OleDbConnection>());
            Assert.That((conn as OleDbConnection).ConnectionString, Is.EqualTo(connStr));
        }
Esempio n. 2
0
        public void Get_SqlOleDb_OledbConnection()
        {
            var connStr = "Provider=sqlOledB;Data Source=ds;Initial Catalog=ic";
            var actual  = new OleDbClientFactory().Instantiate(connStr);

            Assert.That(actual, Is.InstanceOf <DbClient>());
            Assert.That(actual.ConnectionString, Is.EqualTo(connStr));
            var conn = actual.CreateNew();

            Assert.That(conn, Is.InstanceOf <OleDbConnection>());
            Assert.That((conn as OleDbConnection).ConnectionString, Is.EqualTo(connStr));
        }