Beispiel #1
0
        public void ChangeNameTest()
        {
            var expectedName = "[1]. Artist - Title 2015 live in Russia";
            var mask         = new Mask("[{track}]. {artist} - {title} {year} live in Russia");

            _testTager.Load("oldfilename");
            _testTager.ChangeTags(_tesTags);
            _testTager.ChangeName(mask);

            var currentFile = _testTager.CurrentFile as TestMp3File;

            Assert.AreEqual(true, currentFile.ChangeNameFlag);
            Assert.AreEqual(expectedName, currentFile.Name);
        }
Beispiel #2
0
        public override bool Call(Mask mask, Tager tager, IMp3File file)
        {
            if (_isCanceled)
            {
                RestoreFile();
                return(true);
            }

            _file = file;

            try
            {
                _memento = _file.GetMemento();
                tager.ChangeName(mask);

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Beispiel #3
0
        public override bool Call(Mask mask, Tager tager, IMp3File file)
        {
            if (_isCanceled)
            {
                RestoreFile();
                return true;
            }

            _file = file;

            try
            {
                _memento = _file.GetMemento();
                tager.ChangeName(mask);

                return true;
            }
            catch (Exception)
            {
                return false;
            }
        }