且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

NUnit测试用例 - 来自Datatable的字符串数组

更新时间:2023-02-16 12:39:07

Need NUnit Test Case for the below Function. For the saem function If I Built the Datatable Inside the Function Test Case succeeds. If its comes from DB Test case fails.

public ActionResult GetCustomerInfo()
{
DataTable dtCustomerInfo = BL.rptCustomerInfo();
Session["dtCustomerInfo"] = dtCustomerInfo;
List<system.collections.arraylist> CustomerInfo = new List<system.collections.arraylist>();
foreach (DataRow dataRow in dtCustomerInfo.Rows)
{
System.Collections.ArrayList values = new System.Collections.ArrayList();
foreach (object value in dataRow.ItemArray)
values.Add(value);
CustomerInfo.Add(values);
}
var model = CustomerInfo;
return model;
}


Regards,
Kalaiselvan