示例#1
0
        public void CreateDoubleFolder()
        {
            MtpDirectory mtpDirectory = new MtpDirectory();

            mtpDirectory.CreateDirectory(@"Xperia XA\SD Card\Music\abc2");
            Assert.True(mtpDirectory.Exists(@"Xperia XA\SD Card\Music\abc2"));
            mtpDirectory.CreateDirectory(@"Xperia XA\SD Card\Music\abc2");
            Assert.True(mtpDirectory.Exists(@"Xperia XA\SD Card\Music\abc2"));
        }
示例#2
0
        public void DeleteFolderOk()
        {
            MtpDirectory mtpDirectory = new MtpDirectory();

            mtpDirectory.CreateDirectory(@"Xperia XA\SD Card\Music\abc1\abc2\abc3");
            Assert.True(mtpDirectory.Exists(@"Xperia XA\SD Card\Music\abc1\abc2\abc3"));
            mtpDirectory.Delete(@"Xperia XA\SD Card\Music\abc1\abc2\abc3", false);
            Assert.False(mtpDirectory.Exists(@"Xperia XA\SD Card\Music\abc1\abc2\abc3"));
            Assert.True(mtpDirectory.Exists(@"Xperia XA\SD Card\Music\abc1\abc2"));
        }
示例#3
0
        public void ExistsReturnFalseNoLeafFolder()
        {
            MtpDirectory mtpDirectory = new MtpDirectory();

            Assert.False(mtpDirectory.Exists(@"Xperia XA\SD Card\Music1"));
        }
示例#4
0
        public void ExistsReturnFalseNoDevice()
        {
            MtpDirectory mtpDirectory = new MtpDirectory();

            Assert.False(mtpDirectory.Exists(@"Xperia XA1\SD Card\Music"));
        }
示例#5
0
        public void ExistsReturnTrue()
        {
            MtpDirectory mtpDirectory = new MtpDirectory();

            Assert.True(mtpDirectory.Exists(@"Xperia XA\SD Card\Music"));
        }
示例#6
0
        public void ExistsWithNoPath()
        {
            MtpDirectory mtpDirectory = new MtpDirectory();

            mtpDirectory.Exists("");
        }