Click here to Skip to main content
15,884,062 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
My web Application inserts some run time values in Log tables. that is Browser Name, PageURL, UserIP etc. How can I set these values in my unit test case using VS2010
Posted

You need to use the Mock Object pattern

http://msdn.microsoft.com/en-us/magazine/cc163904.aspx[^]
 
Share this answer
 
Have a look here: Loading Test Data from a Database[^]

Full details here[^].
Also look at this one: MSDN: Unit Test Mock Views[^]
 
Share this answer
 
v2
Comments
thatraja 8-Jan-11 2:37am    
Good answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900