Ejemplo n.º 1
0
 public MusicFileRenamerShell(string[] args)
 {
     _shellMaker  = new ShellMaker();
     _args        = _shellMaker.MakeArgsShell(args);
     _fileWorker  = new FileWorker(_args);
     _fileRenamer = new MusicFileRenamer(_args.Renamer);
 }
Ejemplo n.º 2
0
        public void ToFileNameRename()
        {
            _renamer = new MusicFileRenamer(new FileNameRenamer());
            var actual = _renamer.RenameMusicFile(filePath, artistTag, titleTag);

            var expectedFilePath  = @"\music\favorite\Ivanov-Linux.mp3";
            var expectedArtistTag = artistTag;
            var expectedTitleTag  = titleTag;

            Assert.AreEqual(expectedFilePath, actual.FullFilePath);
            Assert.AreEqual(expectedArtistTag, actual.TagArtist);
            Assert.AreEqual(expectedTitleTag, actual.TagTitle);
        }
Ejemplo n.º 3
0
        public void ToTagRename()
        {
            _renamer = new MusicFileRenamer(new TagRenamer());
            var actual = _renamer.RenameMusicFile(filePath, artistTag, titleTag);

            var expectedFilePath  = filePath;
            var expectedArtistTag = "Petrov";
            var expectedTitleTag  = "Windows";

            Assert.AreEqual(expectedFilePath, actual.FullFilePath);
            Assert.AreEqual(expectedArtistTag, actual.TagArtist);
            Assert.AreEqual(expectedTitleTag, actual.TagTitle);
        }
Ejemplo n.º 4
0
        public void DoNotRenameUnknownExtensionFile()
        {
            _renamer = new MusicFileRenamer(new FileNameRenamer());

            var fileWithUnknownExtension = @"\music\favorite\Petrov-Windows.cs";

            var actual = _renamer.RenameMusicFile(fileWithUnknownExtension, artistTag, titleTag);

            var expectedFilePath  = fileWithUnknownExtension;
            var expectedArtistTag = artistTag;
            var expectedTitleTag  = titleTag;

            Assert.AreEqual(expectedFilePath, actual.FullFilePath);
            Assert.AreEqual(expectedArtistTag, actual.TagArtist);
            Assert.AreEqual(expectedTitleTag, actual.TagTitle);
        }