Example #1
0
        public void StreamedIO_RW_Meta()
        {
            string resource         = "OGG/empty.ogg";
            string location         = TestUtils.GetResourceLocationRoot() + resource;
            string testFileLocation = TestUtils.GetTempTestFile(resource);

            using (FileStream fs = new FileStream(testFileLocation, FileMode.Open, FileAccess.ReadWrite, FileShare.Read))
            {
                Vorbis_OGG offTest = new Vorbis_OGG();
                offTest.TagIO_RW_VorbisOGG_Empty(fs);
                fs.Seek(0, SeekOrigin.Begin); // Test if stream is still open
            }

            // Get rid of the working copy
            File.Delete(testFileLocation);
        }
Example #2
0
        public void StreamedIO_R_Meta()
        {
            string resource         = "OGG/ogg.ogg";
            string location         = TestUtils.GetResourceLocationRoot() + resource;
            string testFileLocation = TestUtils.CopyAsTempTestFile(resource);

            using (FileStream fs = new FileStream(testFileLocation, FileMode.Open, FileAccess.Read, FileShare.Read))
            {
                Vorbis_OGG offTest = new Vorbis_OGG();
                offTest.TagIO_R_VorbisOGG_simple_OnePager(fs);
                fs.Seek(0, SeekOrigin.Begin); // Test if stream is still open
            }

            // Get rid of the working copy
            if (Settings.DeleteAfterSuccess)
            {
                File.Delete(testFileLocation);
            }
        }