public void CanBindUninitializedIReadOnlyCollection()
        {
            var input = new Dictionary <string, string>
            {
                { "IReadOnlyCollection:0", "val0" },
                { "IReadOnlyCollection:1", "val1" },
                { "IReadOnlyCollection:2", "val2" },
                { "IReadOnlyCollection:x", "valx" }
            };

            var configurationBuilder = new ConfigurationBuilder();

            configurationBuilder.AddInMemoryCollection(input);
            var config = configurationBuilder.Build();

            var options = new UnintializedCollectionsOptions();

            config.FastBind(options);

            var array = options.IReadOnlyCollection.ToArray();

            Assert.AreEqual(4, array.Length);

            Assert.AreEqual("val0", array[0]);
            Assert.AreEqual("val1", array[1]);
            Assert.AreEqual("val2", array[2]);
            Assert.AreEqual("valx", array[3]);
        }
        public void CanBindUninitializedIReadOnlyDictionary()
        {
            var input = new Dictionary <string, string>
            {
                { "IReadOnlyDictionary:abc", "val_1" },
                { "IReadOnlyDictionary:def", "val_2" },
                { "IReadOnlyDictionary:ghi", "val_3" }
            };

            var configurationBuilder = new ConfigurationBuilder();

            configurationBuilder.AddInMemoryCollection(input);
            var config = configurationBuilder.Build();

            var options = new UnintializedCollectionsOptions();

            config.FastBind(options);

            Assert.AreEqual(3, options.IReadOnlyDictionary.Count);

            Assert.AreEqual("val_1", options.IReadOnlyDictionary["abc"]);
            Assert.AreEqual("val_2", options.IReadOnlyDictionary["def"]);
            Assert.AreEqual("val_3", options.IReadOnlyDictionary["ghi"]);
        }