Better Exception if SetCulture attribute is applied multiple times
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NUnit Framework |
Fix Released
|
Medium
|
Charlie Poole | ||
NUnit V2 |
Fix Released
|
Medium
|
Charlie Poole | ||
NUnitLite |
Fix Released
|
Medium
|
Charlie Poole |
Bug Description
The following exception is throw If I accidentally apply twice a SetCulture attribute to a test case. It would be nice if the exception message would point to the cause of the problem.
System.
Changed in nunit-3.0: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in nunitlite: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in nunitv2: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in nunitlite: | |
milestone: | none → 0.9 |
Changed in nunitv2: | |
milestone: | none → 2.6.3 |
Changed in nunitlite: | |
assignee: | nobody → Charlie Poole (charlie.poole) |
Changed in nunitv2: | |
assignee: | nobody → Charlie Poole (charlie.poole) |
Changed in nunitlite: | |
status: | Triaged → Fix Committed |
Changed in nunit-3.0: | |
assignee: | nobody → Charlie Poole (charlie.poole) |
milestone: | none → 2.9.6 |
Changed in nunitv2: | |
status: | Triaged → Fix Committed |
Changed in nunit-3.0: | |
status: | Triaged → Fix Committed |
Changed in nunitlite: | |
status: | Fix Committed → Fix Released |
Changed in nunit-3.0: | |
status: | Fix Committed → Fix Released |
Changed in nunitv2: | |
status: | Fix Committed → Fix Released |
This is due to the fact that SetCultureAttribute is allowed multiple times in order to provide for a future extension whereby the test might be run multiple times under different cultures. In fact, the implementation may change to using a single attribute with multiple, comma-separated cultures.
For NUnit 2.x and NUnitLite, the simple solution is to not allow multiple occurrences of the attribute. For NUnit 3.0, we could do that at first but then implement the preferred solution of running multiple times.
Charlie