

[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); }
本文介绍了一个测试方法的示例代码,展示了如何创建并使用还款记录实体类,通过属性信息进行数据格式化输出,并确保输出结果非空。
1187

被折叠的 条评论
为什么被折叠?



