TtxtPetraDate specification and testing: Difference between revisions
Jump to navigation
Jump to search
(Created page with '= requirements = * allow entering the date by digits only, eg. 311212 becomes 31-dec-2012 * allow entering = for todays date * allow entering +3 for three days from today * if an…') |
(→code) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= requirements = | = requirements = | ||
* always display the date in this format: dd-MMM-yyyy | |||
* allow entering the date by digits only, eg. 311212 becomes 31-dec-2012 | * allow entering the date by digits only, eg. 311212 becomes 31-dec-2012 | ||
* allow entering = for todays date | * allow entering = for todays date | ||
Line 7: | Line 8: | ||
= code = | = code = | ||
* there is a NUnit test | * there is a NUnit test: http://bazaar.launchpad.net/~openpetracore/openpetraorg/trunkhosted/view/head:/csharp/ICT/Testing/lib/Common/Controls/txtPetraDate.cs | ||
* there is a test application | * there is a test application: http://bazaar.launchpad.net/~openpetracore/openpetraorg/trunkhosted/files/head:/csharp/ICT/Testing/exe/Controls/txtPetraDate/ | ||
= events = | = events = | ||
Line 15: | Line 16: | ||
= problems = | = problems = | ||
* event | * event LostFocused is only triggered on the screen, but not when the text property is changed, in the unit test | ||
** Solution: test application with a screen | |||
* enter 30: messagebox, invalid date. but enter some text, no message box | * enter 30: messagebox, invalid date. but enter some text, no message box | ||
** fixed | |||
* UK culture: can parse 20-MARCH-2012, but not 20-NOVEMBER-2012 | * UK culture: can parse 20-MARCH-2012, but not 20-NOVEMBER-2012 | ||
** cannot reproduce |
Latest revision as of 08:22, 12 October 2012
requirements
- always display the date in this format: dd-MMM-yyyy
- allow entering the date by digits only, eg. 311212 becomes 31-dec-2012
- allow entering = for todays date
- allow entering +3 for three days from today
- if an invalid date is entered, show a message. do not delete the input
- only throw a DateChanged event if there is a new valid date, or the date has been deleted
code
- there is a NUnit test: http://bazaar.launchpad.net/~openpetracore/openpetraorg/trunkhosted/view/head:/csharp/ICT/Testing/lib/Common/Controls/txtPetraDate.cs
- there is a test application: http://bazaar.launchpad.net/~openpetracore/openpetraorg/trunkhosted/files/head:/csharp/ICT/Testing/exe/Controls/txtPetraDate/
events
DateChanged
- used in csharp\ICT\Petra\Client\MFinance\Gui\Gift\UC_GiftBatches-generated.Designer.cs, calling UpdateBatchPeriod
problems
- event LostFocused is only triggered on the screen, but not when the text property is changed, in the unit test
- Solution: test application with a screen
- enter 30: messagebox, invalid date. but enter some text, no message box
- fixed
- UK culture: can parse 20-MARCH-2012, but not 20-NOVEMBER-2012
- cannot reproduce