Exemple #1
0
        public void MapBully()
        {
#if !DEBUG
        Assert.Multiple(() => {
#endif
            var expected = new Dictionary<string, string> { { "a", "" }, { "b", "candy" } };
            var actual = _object.MapBully(new Dictionary<string, string> { { "a", "candy" }, { "b", "dirt" } });
            CollectionAssert.AreEquivalent(expected, actual);

            expected = new Dictionary<string, string> { { "a", "" }, { "b", "candy" } };
            actual = _object.MapBully(new Dictionary<string, string> { { "a", "candy" } });
            CollectionAssert.AreEquivalent(expected, actual);

            expected = new Dictionary<string, string> { { "a", "" }, { "b", "candy" }, { "c", "meh" } };
            actual = _object.MapBully(new Dictionary<string, string> { { "a", "candy" }, { "b", "carrot" }, { "c", "meh" } });
            CollectionAssert.AreEquivalent(expected, actual);

            expected = new Dictionary<string, string> { { "b", "carrot" } };
            actual = _object.MapBully(new Dictionary<string, string> { { "b", "carrot" } });
            CollectionAssert.AreEquivalent(expected, actual);

            expected = new Dictionary<string, string> { { "c", "meh" } };
            actual = _object.MapBully(new Dictionary<string, string> { { "c", "meh" } });
            CollectionAssert.AreEquivalent(expected, actual);

            expected = new Dictionary<string, string> { { "a", "" }, { "b", "sparkle" }, { "c", "meh" } };
            actual = _object.MapBully(new Dictionary<string, string> { { "a", "sparkle" }, { "c", "meh" } });
            CollectionAssert.AreEquivalent(expected, actual);
#if !DEBUG
        });
#endif
        }