Пример #1
0
        public void WithInfoSingleValueAddsValue()
        {
            var builder = new InfoBuilder();

            builder.WithInfo("foo", "bar");
            var built = builder.Build();

            Assert.NotNull(built);
            Assert.Single(built);
            Assert.Equal("bar", built["foo"]);
        }
Пример #2
0
        public void WithInfoDictionaryAddsValues()
        {
            var builder = new InfoBuilder();
            Dictionary <string, object> items = new Dictionary <string, object>()
            {
                { "foo", "bar" },
                { "bar", 100 }
            };

            builder.WithInfo(items);
            var built = builder.Build();

            Assert.NotNull(built);
            Assert.Equal(2, built.Count);
            Assert.Equal("bar", built["foo"]);
            Assert.Equal(100, built["bar"]);
        }