??????????????????????????????????????Nunit????????е?????? ?????в???????????????????????????????????????????????????
    1.TQL_Part??
    1.1????1
    ??????????е????
    /**////
    /// ????taskid?????????Part???
    ///
    ///
    ///
    public WYEng.Model.TQL_Part GetPaperPart??int taskId??
    ??{
    SqlParameter[] parm = new SqlParameter[1];
    parm[0] = new SqlParameter??Parm_TASKID?? SqlDbType.Int????
    parm[0].Value = taskId;
    WYEng.Model.TQL_Part part = new WYEng.Model.TQL_Part??????
    using ??SqlDataReader rdr = XPWY.DBUtility.DBHelperSQL.ExecuteReader??SQL_SELECT_PART?? parm????
    ??{
    while ??rdr.Read??????
    ??{
    part.PartCode = rdr.GetString??0????
    part.SetCode = rdr.GetString??1????
    part.SubjectId = rdr.GetInt32??2????
    part.DisplayOrder = rdr.GetInt32??3????
    part.Description = rdr.GetString??4????
    }
    }
    return part;
    }
    д???????????£?
    using System;
    using System.Collections.Generic;
    using System.Text;
    using NUnit.Framework;
    using WYEng.SQLServerDAL;
    namespace WYEng.TestUnit
    ??{
    [TestFixture]
    public class TQL_Part
    ??{
    SQLServerDAL.TQL_Part part;
    WYEng.Model.TQL_Part p;
    [SetUp]
    public void CreateObject????
    ??{
    part = new WYEng.SQLServerDAL.TQL_Part??????
    p=new WYEng.Model.TQL_Part??????
    }
    [TearDown]
    public void DeleteObject????
    ??{
    part = null;
    p=null;
    }
    [Test]
    public void GetPaperPart????
    ??{
    //????TaskId???????????????Part???????
    p = part.GetPaperPart??1???? //???????
    Assert.AreEqual??p.PartCode?? "6666"????
    }
    }
    }????Nunit????????????????鷢???????
    model???е?TQL_PArt??description?μ???????????
    if ??value != null && value.Length > 50??
    throw new ArgumentOutOfRangeException??"Invalid value for Description"?? value?? value.ToString????????
    ???????description??????Varchar??500????????????50?????????? if ??value != null && value.Length > 50??
    ?????????к????????????