[ 
https://issues.apache.org/jira/browse/TOMAHAWK-1023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602407#action_12602407
 ] 

Leonardo Uribe commented on TOMAHAWK-1023:
------------------------------------------

I see. Checking TestUtils.addDefaultRenderers() This line is here:

        addRenderer(facesContext, "javax.faces.Input", "javax.faces.Hidden",
                "org.apache.myfaces.renderkit.html.HtmlHiddenRenderer");

But if we are using jsf ri this class should be different. Also I have seen on 
other tests (HtmlInputXXX) that after create the component its id is set. like 
this:

        UIComponent component = new HtmlInputText();
        component.setId("TestComponent");
        component.setParent(new HtmlForm());

This is missing on this test, so adding this resolve the problem

> HtmlInputHidden fails unit test when using RI
> ---------------------------------------------
>
>                 Key: TOMAHAWK-1023
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1023
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.6, 1.1.7-SNAPSHOT
>            Reporter: Paul Spencer
>             Fix For: 1.1.7-SNAPSHOT
>
>
> -------------------------------------------------------------------------------
> Test set: org.apache.myfaces.component.html.ext.HtmlInputHiddenTest
> Below are output from the test failures. The test are run using the following 
> command:
>    cd tomahawk/core
>    mvn test -Djsf=ri 
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec <<< 
> FAILURE!
> testDefaultRenderer(org.apache.myfaces.component.html.ext.HtmlInputHiddenTest)
>   Time elapsed: 0.016 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: ID is not null
>       at junit.framework.Assert.fail(Assert.java:47)
>       at junit.framework.Assert.assertTrue(Assert.java:20)
>       at junit.framework.Assert.assertNotNull(Assert.java:220)
>       at 
> org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase.assertIdExists(AbstractTomahawkViewControllerTestCase.java:88)
>       at 
> org.apache.myfaces.component.html.ext.HtmlInputHiddenTest.testDefaultRenderer(HtmlInputHiddenTest.java:64)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to