我有一个DataGrid,它显示程序集中可用的类和方法。 在这里,我AVE连接的数据网格有关数据的C#问题Grid
的图片alt text http://img150.imageshack.us/img150/5109/datagrid.png
现在我的任务是基于DataGrid中值测试用例。这里有几个测试用例。
namespace proj.Test {
using System;
using NUnit.Framework;
using proj;
[TestFixture()]
public class TestClass1 {
[Test()]
public virtual void Testadd1() {
Class1 Class1 = new Class1();
int a = 2147483647;
int b = 2147483647;
}
[Test()]
public virtual void Testadd2() {
Class1 Class1 = new Class1();
int a = 2147483647;
int b = -2147483648;
}
[Test()]
public virtual void Testadd3() {
Class1 Class1 = new Class1();
int a = 2147483647;
int b = -2147483647;
}
[Test()]
public virtual void Testadd4() {
Class1 Class1 = new Class1();
int a = 2147483647;
int b = 2147483646;
}
}
}
现在的问题是,DataGrid中的所有值均为String。我需要转换成像System.Reflection.MethodInfo,System.Type等类型,以便我可以生成这样的测试用例?
我该怎么做,或者是否有其他可能性来生成这样的测试用例?
但事情是,我应该能够编辑我的dataGrid中的值,因此我必须根据dataGrid值生成testCases。 也来自一个XML,从中我填充了dataGrid的值。 – SyncMaster 2009-03-06 14:02:06