Beispiel #1
0
        public BaseIntegrationTesting()
        {
            if (!UseTmpFolder && !UseDataFolder)
            {
                return;
            }

            //Directory.GetCurrentDirectory() m'envoie dans l'AppData/Local/Temp
            var executingAssemblyPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
            var p = new PXDocument(Path.GetDirectoryName(executingAssemblyPath));

            if (UseTmpFolder)
            {
                tmpFolder = new PXDocument(Path.Combine(p.GetParent(3), DATA_FOLDER_NAME, TMP_FOLDER_NAME));
            }
            if (UseDataFolder)
            {
                dataFolder = new PXDocument(Path.Combine(p.GetParent(3), DATA_FOLDER_NAME));
            }
        }
Beispiel #2
0
        public void Test02b_GetParent_TooMuchCountThrowsAnException()
        {
            var p = new PXDocument(@"C:\SIMULATIONS\CMG\328FT\Asdsfg");

            Assert.Throws(typeof(Exception), () => p.GetParent(10));
        }
Beispiel #3
0
        public void Test002a_GetParent_VerifiyCountTwo()
        {
            var p = new PXDocument(@"C:\SIMULATIONS\CMG\328FT\Asdsfg");

            Assert.AreEqual(@"C:\SIMULATIONS\CMG", p.GetParent(2));
        }