Click here to Skip to main content
15,919,613 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: can asp page trigger a application? Pin
nelsonpaixao5-Aug-09 14:08
nelsonpaixao5-Aug-09 14:08 
QuestionValidationGroup/CausesValidation in User Control Pin
the_smiths4-Aug-09 15:36
the_smiths4-Aug-09 15:36 
QuestionDirectorySearcher->FindAll : The specified domain either does not exist or could not be contacted Pin
swjam4-Aug-09 15:10
swjam4-Aug-09 15:10 
AnswerRe: DirectorySearcher->FindAll : The specified domain either does not exist or could not be contacted Pin
Abhijit Jana4-Aug-09 17:31
professionalAbhijit Jana4-Aug-09 17:31 
QuestionNunit and unit testing of ASP.NET application [modified] Pin
Sandeep Akhare4-Aug-09 9:19
Sandeep Akhare4-Aug-09 9:19 
AnswerRe: Nunit and unit testing of ASP.NET application Pin
Christian Graus4-Aug-09 13:21
protectorChristian Graus4-Aug-09 13:21 
GeneralRe: Nunit and unit testing of ASP.NET application Pin
Sandeep Akhare4-Aug-09 16:10
Sandeep Akhare4-Aug-09 16:10 
AnswerRe: Nunit and unit testing of ASP.NET application Pin
N a v a n e e t h4-Aug-09 15:50
N a v a n e e t h4-Aug-09 15:50 
Sandeep Akhare wrote:
now how can i test this methods using Nunit framework


You need to isolate the dependencies. Separate the code into several projects and have a single project for all your ASPX files. Now you can write tests for the other projects. Other projects should not get a reference to System.Web.

Sandeep Akhare wrote:
how should i initialized these objects ?
should i use mock object concept ?


Probably yes. You need to create an interface which wraps HttpContext. Inject this interface as a dependency to your business classes. Read more about dependency injection[^].

In your test cases, you can mock this interface and set expectations. I suggest Rhino Mocks[^] for mocking.

It is a wise idea to program to interfaces than implementations.

Sandeep Akhare wrote:
is Nunit framework appropriate tool for writing the test cases ?


Yes. Its a great piece of work.

Smile | :)


GeneralRe: Nunit and unit testing of ASP.NET application Pin
Sandeep Akhare4-Aug-09 16:15
Sandeep Akhare4-Aug-09 16:15 
GeneralRe: Nunit and unit testing of ASP.NET application Pin
N a v a n e e t h4-Aug-09 16:26
N a v a n e e t h4-Aug-09 16:26 
GeneralRe: Nunit and unit testing of ASP.NET application Pin
Sandeep Akhare5-Aug-09 12:05
Sandeep Akhare5-Aug-09 12:05 
QuestionArchitecture for Role based Applications Pin
saboor awan4-Aug-09 8:59
saboor awan4-Aug-09 8:59 
AnswerRe: Architecture for Role based Applications Pin
Hemant_ec484-Aug-09 9:31
Hemant_ec484-Aug-09 9:31 
Question[Message Deleted] Pin
Veera anil4-Aug-09 7:44
Veera anil4-Aug-09 7:44 
AnswerRe: dynamic check box's gridview in asp .net Pin
Hemant_ec484-Aug-09 7:47
Hemant_ec484-Aug-09 7:47 
GeneralRe: dynamic check box's gridview in asp .net Pin
Vijaykumar_Vsk3-Sep-09 3:24
Vijaykumar_Vsk3-Sep-09 3:24 
AnswerCP Member : Please Ignore - Crosspost Pin
Abhijit Jana4-Aug-09 7:59
professionalAbhijit Jana4-Aug-09 7:59 
Questiondynamicaly adding check box's gridview in asp .net Pin
Veera anil4-Aug-09 7:14
Veera anil4-Aug-09 7:14 
AnswerRe: dynamicaly adding check box's gridview in asp .net Pin
Blue_Boy4-Aug-09 7:18
Blue_Boy4-Aug-09 7:18 
GeneralRe: dynamicaly adding check box's gridview in asp .net Pin
Veera anil4-Aug-09 7:36
Veera anil4-Aug-09 7:36 
GeneralRe: dynamicaly adding check box's gridview in asp .net Pin
Hemant_ec484-Aug-09 7:46
Hemant_ec484-Aug-09 7:46 
GeneralRe: dynamicaly adding check box's gridview in asp .net Pin
Veera anil4-Aug-09 7:58
Veera anil4-Aug-09 7:58 
AnswerRe: dynamicaly adding check box's gridview in asp .net Pin
Abhijit Jana4-Aug-09 8:03
professionalAbhijit Jana4-Aug-09 8:03 
GeneralRe: dynamicaly adding check box's gridview in asp .net Pin
Hemant_ec484-Aug-09 8:25
Hemant_ec484-Aug-09 8:25 
AnswerRe: dynamicaly adding check box's gridview in asp .net Pin
Abhijit Jana4-Aug-09 7:24
professionalAbhijit Jana4-Aug-09 7:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.