GetFullDataFromString() публичный Метод

public GetFullDataFromString ( Queue prefixesQueue, string mp3NameString, Queue tags ) : string>.Dictionary
prefixesQueue Queue
mp3NameString string
tags Queue
Результат string>.Dictionary
Пример #1
0
        public void Test_GetFullDataFromString_DelimiterExpected()
        {
            var extracter = new DataExtracter("{id}{artist} - {title}");
            var tags = extracter.GetTags();
            var prefixes = extracter.FindAllPrefixes(tags);

            var data = extracter.GetFullDataFromString(prefixes, "10. test artist - test song name", tags);
        }
Пример #2
0
        public void Test_FirstPrefix()
        {
            var extracter = new DataExtracter("[{id}] {artist}");
            var tags = extracter.GetTags();
            var prefixes = extracter.FindAllPrefixes(tags);
            var data = extracter.GetFullDataFromString(prefixes, "[10] test artist", tags);

            var expected = new Dictionary<TagType, string> {{TagType.Id, "10"}, {TagType.Artist, "test artist"}};

            CollectionAssert.AreEqual(expected, data);
        }
Пример #3
0
        public void Test_GetFullDataFromString()
        {
            var extracter = new DataExtracter("{id}. {artist} - {title}");
            var tags = extracter.GetTags();
            var prefixes = extracter.FindAllPrefixes(tags);

            var data = extracter.GetFullDataFromString(prefixes, "10. test artist - test song name", tags);

            var expected = new Dictionary<TagType, string> { { TagType.Id, "10" }, { TagType.Artist, "test artist" }, { TagType.Title, "test song name" } };

            CollectionAssert.AreEqual(expected, data);
        }