TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Pragadheesh
NA
6
0
Generate TestCases for Methods based on its Signature using CodeDom in C#
Mar 24 2009 4:19 AM
Consider the following Code snippet,
Assembly asm = Assembly.LoadFile(DLL_Path);
Type t = asm.GetType(DLL_NameSpace.MyClass, false, true);
clsMethodInvoke mi = new clsMethodInvoke();
foreach (MemberInfo oMember in t.GetMembers(mi.GetFilter()))
{
//code here
}
These are the values in the follwing variables,
t = {Name = "Class1" FullName = "a.Class1"}
oMember = {Int32 add(Int32, Int32)}
Now from these values i need to Generate NUnit based TestCases as follows,
[Test()]
public virtual void Testadd1() {
Class1 Class1 = new Class1();
int a = -1; //random values are stored here
int b = 2147483647; //random values are stored here
}
So having the type of the Class in an Assembly i want to generate test cases for each method, as show above. How can i generate such Test Cases.?
Reply
Answers (
0
)
Help Application
What is wrong with this one