public void CanGetExtraInformation()
        {
            ConnectionStringSettings data
                = new ConnectionStringSettings(name, "connection string;");

            OracleConnectionData oracleConnectionData = new OracleConnectionData();

            oracleConnectionData.Name = name;
            oracleConnectionData.Packages.Add(new OraclePackageData("package1", "pref1"));
            oracleConnectionData.Packages.Add(new OraclePackageData("package2", "pref2"));

            OracleConnectionSettings oracleConnectionSettings = new OracleConnectionSettings();

            oracleConnectionSettings.OracleConnectionsData.Add(oracleConnectionData);

            configurationSource.Add(OracleConnectionSettings.SectionName, oracleConnectionSettings);

            OracleDatabase database = (OracleDatabase)assembler.Assemble(data.Name, data, configurationSource);

            Assert.IsNotNull(database);
            Assert.AreSame(typeof(OracleDatabase), database.GetType());

            // can't access the packages - must resort to side effect
            DbCommand dBCommand = database.GetStoredProcCommand(OracleTestStoredProcedureInPackageWithTranslation);

            Assert.AreEqual((object)OracleTestTranslatedStoredProcedureInPackageWithTranslation, dBCommand.CommandText);
        }
示例#2
0
        public void WillNotFailIfOracleSectionDoesNotExist()
        {
            ConnectionStringSettings data
                = new ConnectionStringSettings(name, "connection string;");
            OracleDatabase database = (OracleDatabase)assembler.Assemble(data.Name, data, configurationSource);

            Assert.IsNotNull(database);
            Assert.AreSame(typeof(OracleDatabase), database.GetType());
        }