CalendarAggregator.EventCollectorTest.MaybeApplyCatmapAddsExpectedCats C# (CSharp) Метод

MaybeApplyCatmapAddsExpectedCats() приватный Метод

private MaybeApplyCatmapAddsExpectedCats ( ) : void
Результат void
        public void MaybeApplyCatmapAddsExpectedCats()
        {
            var test_feedurl = "test_feedurl";
            var collector_keene = new Collector(new Calinfo("elmcity"), settings);
            collector_keene.per_feed_catmaps[test_feedurl] = new Dictionary<string, string>()
                {
                    { "a", "l,M,n,O,p" },   // this will map
                    { "z", "q" }            // this won't
                };

            var feed_metadict = new Dictionary<string, string>() { { "feedurl", test_feedurl } };

            var evt = new DDay.iCal.Event();

            evt.Categories.Add("a");  // set event categories
            evt.Categories.Add("b");
            evt.Categories.Add("b");  // this dupe should go away

            var list = collector_keene.MaybeApplyCatmap(evt.Categories.ToList(), feed_metadict, "testKeene", "Keene Test Hub");
            list.Sort(String.CompareOrdinal);
            Assert.IsTrue(list.SequenceEqual(new List<string>() { "a", "b", "l", "m", "n", "o", "p" }));
        }