public void AddObject_throws_if_rootSectionName_is_null(IConfigurationBuilder configurationBuilder, object testSource)
 {
     Assert.Throws <ArgumentNullException>(() => ObjectConfigurationExtensions.AddObject(configurationBuilder, testSource, null));
 }
        public void AddObject_configure_ConfigurationBuilder(IConfigurationBuilder configurationBuilder, object testSource, string rootSectionName)
        {
            ObjectConfigurationExtensions.AddObject(configurationBuilder, testSource, rootSectionName);

            Mock.Get(configurationBuilder).Verify(p => p.Add(It.IsAny <ObjectConfigurationSource>()));
        }
        public void AddObject_does_nothing_when_source_is_null(IConfigurationBuilder configurationBuilder, string rootSectionName)
        {
            ObjectConfigurationExtensions.AddObject(configurationBuilder, null, rootSectionName);

            Mock.Get(configurationBuilder).Verify(p => p.Add(It.IsAny <IConfigurationSource>()), Times.Never);
        }
        public void AddObject_returns_ConfigurationBuilder(object testSource, IConfigurationBuilder configurationBuilder, string rootSectionName)
        {
            var output = ObjectConfigurationExtensions.AddObject(configurationBuilder, testSource, rootSectionName);

            Assert.That(output, Is.SameAs(configurationBuilder));
        }