Example #1
0
        public void FillObject_Raises_Exception_When_ParameterIsNull()
        {
            var ex1 = Assert.Throws <ArgumentNullException>(() =>
                                                            DictionaryExtensions.FillObject(null, (object)null));
            var ex2 = Assert.Throws <ArgumentNullException>(() =>
                                                            new Dictionary <string, string>().FillObject((object)null));

            Assert.Equal("dictionary", ex1.ParamName);
            Assert.Equal("objectInstance", ex2.ParamName);
        }