Click here to Skip to main content
15,905,683 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Calender and text box Pin
future38394-Apr-10 19:48
future38394-Apr-10 19:48 
GeneralRe: Calender and text box Pin
Gaurav Dudeja India4-Apr-10 19:52
Gaurav Dudeja India4-Apr-10 19:52 
GeneralRe: Calender and text box Pin
future38395-Apr-10 1:03
future38395-Apr-10 1:03 
GeneralRe: Calender and text box Pin
Gaurav Dudeja India5-Apr-10 1:08
Gaurav Dudeja India5-Apr-10 1:08 
AnswerRe: Calender and text box Pin
T M Gray5-Apr-10 10:11
T M Gray5-Apr-10 10:11 
AnswerRe: Calender and text box Pin
Mohan H Prajapati5-Apr-10 23:42
Mohan H Prajapati5-Apr-10 23:42 
QuestionAccessing SOAP message response elements Pin
parakyar4-Apr-10 8:35
parakyar4-Apr-10 8:35 
QuestionLearning Test Driven Development in VS 2008 - ASP.NET Pin
Nadia Monalisa4-Apr-10 2:00
Nadia Monalisa4-Apr-10 2:00 
Hello,
I am just fresh new learner of Test Driven Development in ASP.NET with Visual Studio 2008. So far everything looks ok, but I have a question regarding the following snippet:

[TestMethod]
     [HostType("ASP.NET")]
     [UrlToTest("http://localhost:49161/Default.aspx?demoParam=Hello")]
     [AspNetDevelopmentServerHost(@"D:\My Projects\AspNetTDD1\AspNetTDD1", "/AspNetTDD1")]
     public void CheckQueryStringParsingAtLoad()
     {
         Page page = TestContext.RequestedPage;

         // need to manually invoke the Page_Load method.
         PrivateObject po = new PrivateObject(page);
         po.Invoke("Page_Load", page, EventArgs.Empty);

         Label label = page.FindControl("Label1") as Label;

         if (label != null)
             Assert.AreEqual("Hello", label.Text);
     }


As you can see, the port number 49161 after the localhost, it changes every time I build the application or if I restart the server. So, if I have 100 test cases, I will have to change the url to every method every time it changes. Is not there any other way to set that url programmatically ? Also, I have a complain about the attribute AspNetDevelopmentServerHost. Why should I Hard Code the path to the application folder ? I want it to be portable so that I can change the folder structure any time? So, I would like to set that Application folder programmatically too.

Can you give me any idea please ?

Regards
AnswerRe: Learning Test Driven Development in VS 2008 - ASP.NET Pin
N a v a n e e t h4-Apr-10 2:40
N a v a n e e t h4-Apr-10 2:40 
GeneralRe: Learning Test Driven Development in VS 2008 - ASP.NET Pin
Nadia Monalisa4-Apr-10 2:54
Nadia Monalisa4-Apr-10 2:54 
GeneralRe: Learning Test Driven Development in VS 2008 - ASP.NET Pin
N a v a n e e t h4-Apr-10 3:55
N a v a n e e t h4-Apr-10 3:55 
GeneralRe: Learning Test Driven Development in VS 2008 - ASP.NET Pin
Nadia Monalisa4-Apr-10 15:06
Nadia Monalisa4-Apr-10 15:06 
GeneralRe: Learning Test Driven Development in VS 2008 - ASP.NET Pin
Kevin McFarlane4-Apr-10 8:46
Kevin McFarlane4-Apr-10 8:46 
AnswerRe: Learning Test Driven Development in VS 2008 - ASP.NET Pin
Kevin McFarlane4-Apr-10 8:39
Kevin McFarlane4-Apr-10 8:39 
QuestionCreate virtual subdomain programaticaly Pin
mehran.asg3-Apr-10 21:18
mehran.asg3-Apr-10 21:18 
QuestionStore repeater value in session variable Pin
lionelcyril3-Apr-10 20:45
lionelcyril3-Apr-10 20:45 
AnswerRe: Store repeater value in session variable Pin
N a v a n e e t h4-Apr-10 2:42
N a v a n e e t h4-Apr-10 2:42 
GeneralRe: Store repeater value in session variable Pin
lionelcyril4-Apr-10 6:17
lionelcyril4-Apr-10 6:17 
QuestionDistorting Text Pin
Randal Vance Cunanan3-Apr-10 20:30
Randal Vance Cunanan3-Apr-10 20:30 
AnswerRe: Distorting Text Pin
N a v a n e e t h4-Apr-10 2:43
N a v a n e e t h4-Apr-10 2:43 
AnswerRe: Distorting Text Pin
Gary Stafford4-Apr-10 16:21
Gary Stafford4-Apr-10 16:21 
GeneralRe: Distorting Text Pin
Randal Vance Cunanan4-Apr-10 16:40
Randal Vance Cunanan4-Apr-10 16:40 
GeneralRe: Distorting Text Pin
Gary Stafford5-Apr-10 3:09
Gary Stafford5-Apr-10 3:09 
Questionrebinding data source controls through wizard Pin
ships_agr3-Apr-10 7:40
ships_agr3-Apr-10 7:40 
Questionform for ordering pizza Pin
pmugagga3-Apr-10 7:26
pmugagga3-Apr-10 7:26 

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.