コード例 #1
0
        public void Topping1()
        {
#if !DEBUG
        Assert.Multiple(() => {
#endif
            var expected = new Dictionary<string, string> { { "bread", "butter" }, { "ice cream", "cherry" } };
            var actual = _object.Topping1(new Dictionary<string, string> { { "ice cream", "peanuts" } });
            CollectionAssert.AreEquivalent(expected, actual);

            expected = new Dictionary<string, string> { { "bread", "butter" } };
            actual = _object.Topping1(new Dictionary<string, string>());
            CollectionAssert.AreEquivalent(expected, actual);

            expected = new Dictionary<string, string> { { "bread", "butter" }, { "pancake", "syrup" } };
            actual = _object.Topping1(new Dictionary<string, string> { { "pancake", "syrup" } });
            CollectionAssert.AreEquivalent(expected, actual);

            expected = new Dictionary<string, string> { { "bread", "butter" }, { "ice cream", "cherry" } };
            actual = _object.Topping1(new Dictionary<string, string> { { "bread", "dirt" }, { "ice cream", "strawberries" } });
            CollectionAssert.AreEquivalent(expected, actual);

            expected = new Dictionary<string, string> { { "bread", "butter" }, { "ice cream", "cherry" }, { "salad", "oil" } };
            actual = _object.Topping1(new Dictionary<string, string> { { "bread", "jam" }, { "ice cream", "strawberries" }, { "salad", "oil" } });
            CollectionAssert.AreEquivalent(expected, actual);
#if !DEBUG
});
#endif
        }