public ChangeTagsCommand(IMp3File mp3File, string mask) { File = mp3File; _maskParser = new MaskParser(mask); OldTags = new Mp3Tags(); File.Tags.CopyTo(OldTags); }
public void CleanUp() { var parser = new MaskParser(_expectedMask); Assert.AreEqual(_expectedMask, parser.GetMaskFromTagsAndSplits()); CollectionAssert.AreEqual(_expectedTags, parser.GetTags()); CollectionAssert.AreEqual(_expectedSplits, parser.GetSplits()); }
public AnalyseCommand(IMp3File mp3File, string mask, IWorker worker) { File = mp3File; _worker = worker; _maskParser = new MaskParser(mask); }
public void MaskParser_WithoutSplits_Exception() { var parser = new MaskParser("{artist}{track}"); parser.ValidateFileName("TestArtist1"); }
public void MaskParser_SplitInBeginAndEnd_Successful() { var parser = new MaskParser("-{artist}.{track}-"); Assert.IsTrue(parser.ValidateFileName("-TestArtist.1-")); }
public void MaskParser_SplitInBegin_Successful() { var parser = new MaskParser("a{artist}"); Assert.IsTrue(parser.ValidateFileName("aTestArtist")); }
public void MaskParser_SameSplits_Successful() { var parser = new MaskParser("{artist} - {title} - {track}"); Assert.IsTrue(parser.ValidateFileName("TestArtist - TestTitle - 1")); }
public void MaskParser_ManySplits_Exception() { var parser = new MaskParser("{artist}-{track}"); parser.ValidateFileName("Test-Artist-1"); }
public void MaskParser_LetterInCenter_Successful() { var parser = new MaskParser("{artist}Q{track}"); Assert.IsTrue(parser.ValidateFileName("TestArtistQ1")); }
public void MaskParser_Common_Successful() { var parser = new MaskParser("{artist} - {title}"); Assert.IsTrue(parser.ValidateFileName("TestArtist - TestTitle")); }
public void MaskParser_IsEqualNumberOfSplitsInMaskAndFileName_ReturnTrue() { // arrange var _expectedMask = "{track}.{artist}.{title}"; var parser = new MaskParser(_expectedMask); // act var actual = parser.IsEqualNumberOfSplitsInMaskAndFileName(".", "Alla.Pop.Arlekino"); // assert Assert.IsTrue(actual); }