Esempio n. 1
0
 public void GetOraConnectionTest2()
 {
     var target = new MyAccess<OracleConnection, OracleCommand, OracleDataAdapter>();
     OracleConnection expected;
     using (expected = new OracleConnection(_oradb))
     {
         expected.Open();
     }
     OracleConnection actual;
     actual = target.GetOraConnection() as OracleConnection;
     Assert.AreEqual(expected.InstanceName, actual.InstanceName);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Esempio n. 2
0
        public void GetThemasTest2()
        {
            var target = new MyAccess<OracleConnection, OracleCommand, OracleDataAdapter>();
            bool actual;
            actual = target.SetOraConnection();

            Assert.AreEqual(true, actual);
            IList<BeheerContextEntity> list = target.GetBusinessObjects("thema", "themanaam");
            Assert.IsTrue(list.Count > 0);

        }
Esempio n. 3
0
        public void Datasettest2()
        {
            var target = new MyAccess<OracleConnection, OracleCommand, OracleDataAdapter>();

            var themaNew = new BeheerContextEntity
            {
                DataKeyValue = "aaaDwight" + DateTime.Now,
                Tablename = "thema",
                DataKeyName = "themanaam"
            };
            string qry = @"select id, {0} from {1} where {0} = '{2}'";
            qry = string.Format(CultureInfo.InvariantCulture, qry, themaNew.DataKeyName, themaNew.Tablename,
                themaNew.DataKeyValue);

            target.Insert(themaNew);
            var ds = target.GetDaBusinessObject(qry, themaNew);
            Assert.AreEqual(themaNew.DataKeyValue, ds.Tables[0].Rows[0].ItemArray[1].ToString());
        }
Esempio n. 4
0
        /// <summary>
        /// Sets the rootdirectory and all Bronbestanden.
        /// </summary>
        /// <param name="projectId"></param>
        /// <param name="rootDir"></param>
        /// <param name="sof"></param>
        /// <param name="saf"></param>
        public void InitializeInputDirectories(int projectId, string rootDir, bool sof, bool saf)
        {
            Debug.Assert(rootDir != null);
            Debug.Assert(DeploymentDirectory != null);

            IsSaf = saf;
            IsSof = sof;
            RootDirectory = rootDir;
            DeploymentDirectory = Utility.GetAssemblyRootPath();
            MyAccess target = new MyAccess { DeploymentDirectory = DeploymentDirectory };
            BronBestanden = target.GetPathBronBestanden(projectId, RootDirectory, sof, saf);
            ProjectId = projectId;
            ImplicDirectory = target.ImplicDirectory;
            FaalkansDirectory = target.FaalkansDirectory;
            TnoDirectory = target.TnoDirectory;
            ToetsPeilenDirectory = target.ToetsPeilenDirectory;            
            ResultDir = RootDirectory + "\\Resultaten";
            OutputDir = ResultDir + "\\ProjectId_" + projectId;
            LocatieNamen = GetLocatieNamen(MyAccess.Project.GegevensSet.GegevensSetId);
            SetImplicNamen();
            SetTnoFileName();
            SetScenFileName();
            SetToetspeilenFileName();
            Tpeilen = GetToetspeilen();
        }