标题: 发一个这两天写的满简单的NUNIT代码,希望对大家有帮助 [打印本页] 作者: ecust 时间: 2006-4-7 08:36 标题: 发一个这两天写的满简单的NUNIT代码,希望对大家有帮助 using System;
using NUnit.Framework;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using Buggit.Comm;
using Buggit.Comm.Data;
using System.EnterpriseServices;
namespace Buggit.DatAccess
{
using Buggit.Comm;
using Buggit.Comm.Data;
using Buggit.SysFramework;
using Buggit.DatAccess;
[TestFixture]
/// <summary>
/// TestLogsTest 的摘要说明。
/// </summary>
public class TestLogsTest
{
[Test]
public void GetTestLogsByConditionTest()
{
int PKIDFrom = 0;
int PKIDTo = 2000;
string InputerName = "wang.zhongmei";
int ProjectID = 30;
int LocationID= 0;
DateTime InputTimeFrom = Convert.ToDateTime("2001-12-18");
DateTime InputTimeTo = System.DateTime.Now;
DataSet dr = new DataSet();
TTestLog ad=new TTestLog();
Buggit.DatAccess.TestLogs source= new TestLogs();
dr=source.GetTestLogsByCondition(PKIDFrom,PKIDTo,InputerName,ProjectID,LocationID,InputTimeFrom,InputTimeTo).dataSet;
int count=dr.Tables[TTestLog.TABLENAME].Rows.Count;
Assert.AreEqual(10,count);
}
}
}