示例#1
0
        public void AddMatch()
        {
            obj = obj.AddMatch("five", 5);
            Assert.Equal(5, obj.Matches["five"]);

            // Add should throw if the entry already exists.
            Assert.Throws <ArgumentException>(() => obj.AddMatch("five", 8));

            var rooted = obj.AsRoot.AddMatch("six", 6);

            Assert.Equal(6, rooted.Matches["six"]);
        }
        public void AddMatch()
        {
            obj = obj.AddMatch("five", 5);
            Assert.Equal(5, obj.Matches["five"]);

            // Add should throw if the entry already exists.
            Assert.Throws<ArgumentException>(() => obj.AddMatch("five", 8));

            var rooted = obj.AsRoot.AddMatch("six", 6);
            Assert.Equal(6, rooted.Matches["six"]);
        }