}
/********************************************************/
我的测试代码如下:
/********************************************************/
[TestFixture]
public class TestDataList
{
protected DataSet datalist = new DataSet();
protected static SqlConnection myConnection = new SqlConnection("Server=192.168.42.93;DataBase=jwdw;uid=sa;pwd=");
protected static string sqlstring;
[Test]
public void ds()
{
SqlDataAdapter myAdapter = new SqlDataAdapter("select top 1 * from t_jwdwCheckUp",myConnection);
DataSet datalist = new DataSet();
myAdapter.Fill(datalist,"dl");
DataList dl = new DataList();
dl.SqlString="select * from t_jwdwCheckUp";
dl.DSList();
Assert.AreEqual(datalist,dl.DSList(),datalist.Tables[0].Rows.Count.ToString());