[MAGNOLIA-1986] Magnolia tag libraries lack unit tests Created: 03/Jan/08 Updated: 23/Jan/13 Resolved: 11/Jan/08 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | taglibs |
| Affects Version/s: | None |
| Fix Version/s: | 3.5.3, 3.6, 3.5.9 |
| Type: | Improvement | Priority: | Major |
| Reporter: | Ryan Gardner | Assignee: | Vivian Steller |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Date of First Response: |
| Description |
|
I've found a handful of bugs in the tag libraries that have been a real nuisance to isolate. I wrote a MgnlTagTestCase to help create the necessary mock objects to test the existing tags unchanged (i.e. test them as they spit out content to the JspWriter - and verify that the output is what is expected) In the attached patch, I also have a test started for the cms:out tag - this test case only covers the UUID link output that I logged in another issue ( http://jira.magnolia.info/browse/MAGNOLIA-1978 ) This change should not interfere with anything else - it just adds the ability to more easily generate tests for the tag library functions. |
| Comments |
| Comment by Ryan Gardner [ 03/Jan/08 ] |
|
This revised version has the standard magnolia header on it. (One other note: the pom.xml for the magnolia-core was changed to include the same mockrunner dependency that is already being used in the taglib module tests) |
| Comment by Philipp Bracher [ 11/Jan/08 ] |
|
Thanks a lot |
| Comment by Magnolia International [ 08/Jul/08 ] |
|
funnily enough, I only just noticed the assertJspContent() methods were never doing any actual assertions. Luckily, the tests still pass once adding it |
| Comment by Ryan Gardner [ 08/Jul/08 ] |
|
That's hilarious that I forgot to have the assertJspContents throw an exception or make any assertions... I'm glad it was of assistance. |