public void GetTest() { FCConfigBean target = new FCConfigBean(); // TODO: Initialize to an appropriate value string propertyName = string.Empty; // TODO: Initialize to an appropriate value object expected = null; // TODO: Initialize to an appropriate value object actual; //属性值为空,返回NULL actual = target.Get(propertyName); Assert.AreEqual(expected, actual); Assert.IsNull(actual); //不存在属性,返回NULL propertyName = "lala"; actual = target.Get(propertyName); Assert.IsNull(actual); //正确的属性 从本地的FC.config和Temp.FC.config文件中得来 propertyName = "fckey"; expected = "fcvalue"; Assert.AreEqual(expected, actual); }