Пример #1
0
        public void MapAB()
        {
#if !DEBUG
        Assert.Multiple(() => {
#endif
            var expected = new Dictionary<string, string> { { "a", "Hi" }, { "ab", "HiThere" }, { "b", "There" } };
            var actual = _object.MapAB(new Dictionary<string, string> { { "a", "Hi" }, { "b", "There" } });
            CollectionAssert.AreEquivalent(expected, actual);

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

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

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

            expected = new Dictionary<string, string> { { "a", "aaa" }, { "ab", "aaabbb" }, { "b", "bbb" }, { "c", "ccc" } };
            actual = _object.MapAB(new Dictionary<string, string> { { "a", "aaa" }, { "ab", "nope" }, { "b", "bbb" }, { "c", "ccc" } });
            CollectionAssert.AreEquivalent(expected, actual);

            expected = new Dictionary<string, string> { { "ab", "nope" }, { "b", "bbb" }, { "c", "ccc" } };
            actual = _object.MapAB(new Dictionary<string, string> { { "ab", "nope" }, { "b", "bbb" }, { "c", "ccc" } });
            CollectionAssert.AreEquivalent(expected, actual);
#if !DEBUG
});
#endif
        }