[TestMethod] public void Test6() { List<RepaymentRecord> repaymentList = new List<RepaymentRecord>(); StringBuilder msg = new StringBuilder(); RepaymentRecord entity = new RepaymentRecord(); entity.Month1 = "100"; entity.Month18 = "900"; entity.Month24 = "322"; foreach (PropertyInfo p in entity.GetType().GetProperties()) { msg.AppendFormat("{0},{1}", p.Name, p.GetValue(entity)); } var result = msg; Assert.IsNotNull(result); }