Re: [NUnitAsp-devl] Allowing Enable Property to Be Set
Brought to you by:
jlittle82
From: Jim S. <js...@ti...> - 2005-08-23 20:52:11
|
Aaron, thank you for this patch. It's a good change that I can see being useful for a lot of cases where JavaScript is involved. I have a few questions for you: 1- I have been considering removing the 'enabled' assertion entirely. The method would still be present but NUnitAsp would stop throwing exceptions when a control is disabled. I would still include your patch, as I think it has broader uses. Do you think removing the 'enabled' assertion would be a good idea? Why/why not? (Anybody else with an opinion on this, feel free to chime in.) 2- I see that you don't allow the 'id' attribute to be changed. What was the reasoning behind that? Regards, Jim Aaron Jensen wrote: > In my web application, there are some controls that load to the browser > disabled, but are then enabled using JavaScript. I went ahead and added > this functionality to the HtmlTag class. I added a unit test to the > CheckBoxTest test suite. I have attached these files and assign the > copyright to Jim Shore. > > - I modifed ControlTester to add the set { } portion of the IsDisabled > property. > > - I modified AspTester\AspControlTester to add the set { } portion of > the Enabled property (which just calls the base.IsDisbled proeprty). > > - Added RemoveAttribte(string) and SetAttribute(string, string) methods > to HtmlTag. When enabling/disabling a control, it removes/adds the > "disabled" attribute on the tag. > > - Added tests for the above methods and properties to the HtmlTagTest > and AspTester\CheckBoxTest test suites. > > I ran the test suite and all tests are passing. I did a CVS Update > *before* making these changes (that was at 3:30 pm today). > > Let me know if there are any questions. -- James Shore--Titanium IT--Recipient of 2005 Gordon Pask award New Course! "Test-Driven ASP.NET" Sept 13-15 in Bellevue, WA. Details at http://nunitasp.sourceforge.net/tdd-course.html phone: 503-267-5490 email: js...@ti... web/blog: http://www.jamesshore.com |