????????е????????????
???????????? ???????[ 2011/8/26 14:52:09 ] ????????
??????????????????????????????????????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??
?????????к????????????
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??
?????????к????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
?????????????????????д?ò??????????????????????????????Щ??????????????????????????????????????????????????????????????APP????????????????????????????????????????5??????????????????????SQL?????в??????????Щ???????裿??γ???????????????????????????????Щ???????????????????д?淶???????????????????????????????????????裿
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????