Ejemplo n.º 1
0
        public InitializeResult Initialize()
        {
            Log.Comment("Adding set up for the tests");

            // These tests rely on underlying file system so we need to make
            // sure we can format it before we start the tests.  If we can't
            // format it, then we assume there is no FS to test on this platform.

            // delete the directory DOTNETMF_FS_EMULATION
            try
            {
                IOTests.IntializeVolume();

                Directory.CreateDirectory(testDir);
                Directory.SetCurrentDirectory(testDir);
            }
            catch (Exception ex)
            {
                Log.Comment("Skipping: Unable to initialize file system" + ex.StackTrace);

                return(InitializeResult.Skip);
            }

            return(InitializeResult.ReadyToGo);
        }
Ejemplo n.º 2
0
        public InitializeResult Initialize()
        {
            // These tests rely on underlying file system so we need to make
            // sure we can format it before we start the tests.  If we can't
            // format it, then we assume there is no FS to test on this platform.

            // delete the directory DOTNETMF_FS_EMULATION
            try
            {
                IOTests.IntializeVolume();

                Directory.CreateDirectory(GetDir(DIRA, DIR1));
                Directory.CreateDirectory(GetDir(DIRA, DIR2));
                Directory.CreateDirectory(GetDir(DIRB, DIR1));
                Directory.CreateDirectory(GetDir(DIRB, DIR2));
            }
            catch (Exception ex)
            {
                Log.Exception("Skipping: Unable to initialize file system", ex);

                return(InitializeResult.Skip);
            }

            return(InitializeResult.ReadyToGo);
        }
Ejemplo n.º 3
0
        public InitializeResult Initialize()
        {
            Log.Comment("Adding set up for the tests");

            // delete the Path DOTNETMF_FS_EMULATION
            try { IOTests.IntializeVolume(); }
            catch { return(InitializeResult.Skip); }
            return(InitializeResult.ReadyToGo);
        }
Ejemplo n.º 4
0
 public InitializeResult Initialize()
 {
     Log.Comment("Set up for the tests");
     try
     {
         IOTests.IntializeVolume();
     }
     catch
     {
         return(InitializeResult.Skip);
     }
     return(InitializeResult.ReadyToGo);
 }
 public InitializeResult Initialize()
 {
     Log.Comment("Adding set up for the tests.");
     // Add your functionality here.
     try
     {
         IOTests.IntializeVolume();
     }
     catch
     {
         Log.Comment("Unable to format media, skipping class tests.");
         return(InitializeResult.Skip);
     }
     return(InitializeResult.ReadyToGo);
 }
Ejemplo n.º 6
0
 public InitializeResult Initialize()
 {
     Log.Comment("Adding set up for the tests.");
     // Add your functionality here.
     try
     {
         IOTests.IntializeVolume();
         Directory.CreateDirectory(TestDir);
     }
     catch (Exception ex)
     {
         Log.Comment("Skipping: Unable to initialize file system" + ex.StackTrace);
         return(InitializeResult.Skip);
     }
     return(InitializeResult.ReadyToGo);
 }
Ejemplo n.º 7
0
        public InitializeResult Initialize()
        {
            Log.Comment("The following tests are located in FileStreamTests.cs");

            // delete the directory DOTNETMF_FS_EMULATION
            try
            {
                IOTests.IntializeVolume();
            }
            catch
            {
                Log.Comment("Unable to format media, skipping class tests.");

                return(InitializeResult.Skip);
            }

            return(InitializeResult.ReadyToGo);
        }
Ejemplo n.º 8
0
        public InitializeResult Initialize()
        {
            Log.Comment("The following tests are located in FileTests.cs");

            try
            {
                IOTests.IntializeVolume();
                AddDir(IOTests.Volume.RootDirectory + "\\" + TestDir + "\\" + Mid1 + "\\" + Tail1);
                AddDir(IOTests.Volume.RootDirectory + "\\" + TestDir + "\\" + Mid1 + "\\" + Tail2);
                AddDir(IOTests.Volume.RootDirectory + "\\" + TestDir + "\\" + Mid2 + "\\" + Tail1);
            }
            catch (Exception ex)
            {
                Log.Exception("Skipping: Unable to initialize file system.", ex);

                return(InitializeResult.Skip);
            }

            return(InitializeResult.ReadyToGo);
        }
Ejemplo n.º 9
0
        public InitializeResult Initialize()
        {
            Log.Comment("Adding set up for the tests.");
            // Add your functionality here.

            try
            {
                IOTests.IntializeVolume();

                Directory.CreateDirectory(testDir);
                Directory.SetCurrentDirectory(testDir);
                File.Create(file1Name).Close();
                File.Create(IOTests.Volume.RootDirectory + "\\" + file2Name).Close();
            }
            catch (Exception ex)
            {
                Log.Comment("Skipping: Unable to initialize file system" + ex.StackTrace);
                return(InitializeResult.Skip);
            }

            return(InitializeResult.ReadyToGo);
        }
Ejemplo n.º 10
0
        public InitializeResult Initialize()
        {
            // These tests rely on underlying file system so we need to make
            // sure we can format it before we start the tests.  If we can't
            // format it, then we assume there is no FS to test on this platform.

            // delete the directory DOTNETMF_FS_EMULATION
            try
            {
                IOTests.IntializeVolume();
                Directory.CreateDirectory(TestDir + "\\" + Mid1 + "\\" + Tail1);
                Directory.CreateDirectory(TestDir + "\\" + Mid1 + "\\" + Tail2);
                Directory.CreateDirectory(TestDir + "\\" + Mid2 + "\\" + Tail1);
                // [Dir] [file count]
                // TestDir 0
                // Mid1 0
                // Mid1/Tail1 4
                // Mid1/Tail2 1
                // Mid2 3
                // Mid2/Tail1 2
                AddFile(IOTests.Volume.RootDirectory + "\\" + TestDir + "\\" + Mid1 + "\\" + Tail1 + "\\TestFile1.txt");
                AddFile(IOTests.Volume.RootDirectory + "\\" + TestDir + "\\" + Mid1 + "\\" + Tail1 + "\\TestFile2.txt");
                AddFile(IOTests.Volume.RootDirectory + "\\" + TestDir + "\\" + Mid1 + "\\" + Tail1 + "\\FileTest1.txt");
                AddFile(IOTests.Volume.RootDirectory + "\\" + TestDir + "\\" + Mid1 + "\\" + Tail1 + "\\FileTest2.txt");
                AddFile(IOTests.Volume.RootDirectory + "\\" + TestDir + "\\" + Mid1 + "\\" + Tail2 + "\\TestFile1.txt");
                AddFile(IOTests.Volume.RootDirectory + "\\" + TestDir + "\\" + Mid2 + "\\HeadMidFile1.jpg");
                AddFile(IOTests.Volume.RootDirectory + "\\" + TestDir + "\\" + Mid2 + "\\TailMidFile2.txt");
                AddFile(IOTests.Volume.RootDirectory + "\\" + TestDir + "\\" + Mid2 + "\\TailMidFile3.exe");
                AddFile(IOTests.Volume.RootDirectory + "\\" + TestDir + "\\" + Mid2 + "\\" + Tail1 + "\\FileTest1.txt");
                AddFile(IOTests.Volume.RootDirectory + "\\" + TestDir + "\\" + Mid2 + "\\" + Tail1 + "\\FileTest2.txt");
            }
            catch (Exception ex)
            {
                Log.Exception("Skipping: Unable to initialize file system", ex);
                return(InitializeResult.Skip);
            }

            return(InitializeResult.ReadyToGo);
        }
Ejemplo n.º 11
0
        public InitializeResult Initialize()
        {
            Log.Comment("Adding set up for the tests.");
            try
            {
                IOTests.IntializeVolume();

                Directory.CreateDirectory(sourceDir);
                Directory.CreateDirectory(destDir);
                Directory.SetCurrentDirectory(sourceDir);

                file1 = new FileInfo(file1Name);
                file2 = new FileInfo(file2Name);
            }
            catch (Exception ex)
            {
                Log.Comment("Skipping: Unable to initialize file system" + ex.StackTrace);
                return(InitializeResult.Skip);
            }
            // Add your functionality here.

            return(InitializeResult.ReadyToGo);
        }
Ejemplo n.º 12
0
        public InitializeResult Initialize()
        {
            // These tests rely on underlying file system so we need to make
            // sure we can format it before we start the tests.  If we can't
            // format it, then we assume there is no FS to test on this platform.

            // delete the directory DOTNETMF_FS_EMULATION
            try
            {
                IOTests.IntializeVolume();
                AddDir(IOTests.Volume.RootDirectory + "\\" + TestDir1 + "\\" + Mid1 + "\\" + Tail1);
                AddDir(IOTests.Volume.RootDirectory + "\\" + TestDir1 + "\\" + Mid1 + "\\" + Tail2);
                AddDir(IOTests.Volume.RootDirectory + "\\" + TestDir1 + "\\" + Mid2 + "\\" + Tail1);
                AddDir(IOTests.Volume.RootDirectory + "\\" + TestDir2);
            }
            catch (Exception ex)
            {
                Log.Exception("Skipping: Unable to initialize file system", ex);

                return(InitializeResult.Skip);
            }
            return(InitializeResult.ReadyToGo);
        }