myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r955793 [1/4] - in /myfaces/tomahawk/trunk/core12/src/test: java/org/apache/myfaces/component/ java/org/apache/myfaces/component/html/ java/org/apache/myfaces/component/html/ext/ java/org/apache/myfaces/convert/ java/org/apache/myfaces/cust...
Date Thu, 17 Jun 2010 23:57:56 GMT
Author: lu4242
Date: Thu Jun 17 23:57:54 2010
New Revision: 955793

URL: http://svn.apache.org/viewvc?rev=955793&view=rev
Log:
move all testing code from core to core12

Added:
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlCommandButtonTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlDataTableTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlGraphicImageTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputHiddenTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputSecretTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputTextTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputTextareaTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlMessageTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlMessagesTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlOutputLabelTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlOutputTextTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlPanelGridTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlPanelGroupTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectBooleanCheckboxTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyCheckboxRendererCactus.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyCheckboxTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyListboxTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyMenuTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectOneListboxTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectOneMenuTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectOneRadioTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/convert/
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/date/HtmlDateRenderCactus.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/date/MockHtmlDateRendererTestRenderKit.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/date/MockHtmlDateRendererTestRenderKitFactory.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/date/TestBean.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/date/UserDataTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/savestate/
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/savestate/SaveStateTestBean.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/savestate/UISaveStateTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/stylesheet/
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/stylesheet/StylesheetRendererTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/transform/
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/transform/ManagedFoo.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/transform/XmlTransformTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/tree2/
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/tree2/AbstractTreeTestCase.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/tree2/HtmlTreeRendererTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/tree2/HtmlTreeTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/tree2/TreeWalkerBaseTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/tree2/UITreeDataTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/validators/
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/validators/AbstractValidatorTestCase.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/validators/EmailValidatorTestCase.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/validators/EqualValidatorTestCase.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/validators/RegExprValidatorTestCase.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/dateformat/
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/dateformat/TestSimpleDateFormatter.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/renderkit/html/util/
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/renderkit/html/util/AddResourceTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/renderkit/html/util/ReducedHTMLParserTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/AbstractClassElementTestCase.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/AbstractTagLibTestCase.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/MyFacesTagLibTestCase.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/TomahawkClassElementTestCase.java
    myfaces/tomahawk/trunk/core12/src/test/resources/
    myfaces/tomahawk/trunk/core12/src/test/resources/META-INF/
    myfaces/tomahawk/trunk/core12/src/test/resources/META-INF/dtd/
    myfaces/tomahawk/trunk/core12/src/test/resources/META-INF/dtd/web-jsptaglibrary_1_2.dtd
    myfaces/tomahawk/trunk/core12/src/test/resources/pets.xml
    myfaces/tomahawk/trunk/core12/src/test/resources/pets.xsl
Modified:
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/calendar/HtmlCalendarRendererTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/date/HtmlDateRendererTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/fileupload/HtmlFileUploadRendererTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/toggle/TogglePanelRendererTest.java
    myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/utils/TestUtils.java

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlCommandButtonTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlCommandButtonTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlCommandButtonTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlCommandButtonTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.html.HtmlForm;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlCommandButtonTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlCommandButtonTest(String name)
+    {
+        super(name);
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define the component
+        UIComponent component = new HtmlCommandButton();
+        component.setId("TestComponent");
+        component.setParent(new HtmlForm());
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlDataTableTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlDataTableTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlDataTableTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlDataTableTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,214 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+
+import javax.faces.component.UIColumn;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIData;
+import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import javax.faces.model.ListDataModel;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+/**
+ * @author Mathias Br�kelmann (latest modification by $Author: paulsp $)
+ * @version $Revision: 491829 $ $Date: 2007-01-02 11:13:29 -0500 (mar, 02 ene 2007) $
+ */
+public class HtmlDataTableTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    private HtmlDataTable _dataTable;
+
+    public HtmlDataTableTest(String name)
+    {
+        super(name);
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+        _dataTable = new HtmlDataTable();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+        _dataTable = null;
+    }
+
+    /*
+     * Test method for
+     * 'org.apache.myfaces.component.html.ext.HtmlDataTable.getClientId(FacesContext)'
+     */
+    public void testGetClientIdFacesContext()
+    {
+        assertEquals(-1, _dataTable.getRowIndex());
+        String baseClientId = _dataTable.getClientId(facesContext);
+        assertNotNull(baseClientId);
+        Collection rowClientIds = new HashSet();
+        for (int i = 0; i < 10; i++)
+        {
+            _dataTable.setRowIndex(i);
+            assertTrue("Duplicate client id while iterating rows", rowClientIds
+                    .add(_dataTable.getClientId(facesContext)));
+        }
+        _dataTable.setRowIndex(-1);
+        assertEquals(baseClientId, _dataTable.getClientId(facesContext));
+    }
+
+    /*
+     * Test method for
+     * 'org.apache.myfaces.component.html.ext.HtmlDataTable.findComponent(String clientId)'
+     */
+    public void testFindComponent()
+    {
+        UIInput input = createInputInTree(facesContext);
+
+        UIData data = (UIData) input.getParent().getParent();
+
+        UIComponent comp = data.findComponent(":data:1:input");
+
+        assertTrue(comp instanceof UIInput);
+
+        UIInput uiInput = (UIInput) comp;
+
+        assertEquals(uiInput.getValue(), "test2");
+
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define the component
+        UIData component = new HtmlDataTable();
+        component.setId("TestComponent");
+
+        // Add rows to the table
+        List rows = new ArrayList();
+        rows.add(new TestData("test1", "test1"));
+        rows.add(new TestData("test2", "test2"));
+        rows.add(new TestData("test3", "test3"));
+        component.setValue(new ListDataModel(rows));
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+
+    private UIInput createInputInTree(FacesContext context)
+    {
+
+        UIData uiData = new HtmlDataTable();
+        uiData.setId("data");
+
+        List li = new ArrayList();
+        li.add(new TestData("test1", "test1"));
+        li.add(new TestData("test2", "test2"));
+        li.add(new TestData("test3", "test3"));
+
+        uiData.setValue(new ListDataModel(li));
+        uiData.setVar("detail");
+
+        UIColumn column = new UIColumn();
+
+        uiData.getChildren().add(column);
+
+        UIInput input = new UIInput();
+        input.setId("input");
+        input.setValueBinding("value",
+                createValueBinding("#{detail.description}"));
+
+        column.getChildren().add(input);
+
+        facesContext.getViewRoot().getChildren().add(uiData);
+
+        return input;
+    }
+
+    private ValueBinding createValueBinding(String expr)
+    {
+        return facesContext.getApplication().createValueBinding(expr);
+    }
+
+    public static class TestData implements Serializable
+    {
+        private String _description;
+        private String _value;
+
+        public TestData()
+        {
+
+        }
+
+        TestData(String description, String value)
+        {
+            _description = description;
+            _value = value;
+        }
+
+        public String getDescription()
+        {
+            return _description;
+        }
+
+        public void setDescription(String description)
+        {
+            _description = description;
+        }
+
+        public String getValue()
+        {
+            return _value;
+        }
+
+        public void setValue(String value)
+        {
+            _value = value;
+        }
+    }
+
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlGraphicImageTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlGraphicImageTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlGraphicImageTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlGraphicImageTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.component.html.HtmlForm;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlGraphicImageTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlGraphicImageTest(String name)
+    {
+        super(name);
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define the component
+        HtmlGraphicImage component = new HtmlGraphicImage();
+        component.setId("TestComponent");
+        component.setParent(new HtmlForm());
+        component.setUrl("http://myfaces.apache.org");
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputHiddenTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputHiddenTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputHiddenTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputHiddenTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.html.HtmlForm;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlInputHiddenTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlInputHiddenTest(String name)
+    {
+        super(name);
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define the component
+        UIComponent component = new HtmlInputHidden();
+        component.setId("TestComponent");
+        HtmlForm form = new HtmlForm();
+        form.getChildren().add(component);
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputSecretTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputSecretTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputSecretTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputSecretTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.html.HtmlForm;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlInputSecretTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlInputSecretTest(String name)
+    {
+        super(name);
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define the component
+        UIComponent component = new HtmlInputSecret();
+        component.setId("TestComponent");
+        component.setParent(new HtmlForm());
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+        
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputTextTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputTextTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputTextTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputTextTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.html.HtmlForm;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlInputTextTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlInputTextTest(String name)
+    {
+        super(name);
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define the component
+        UIComponent component = new HtmlInputText();
+        component.setId("TestComponent");
+        component.setParent(new HtmlForm());
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputTextareaTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputTextareaTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputTextareaTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputTextareaTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.html.HtmlForm;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlInputTextareaTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlInputTextareaTest(String name)
+    {
+        super(name);
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define the component
+        UIComponent component = new HtmlInputTextarea();
+        component.setId("TestComponent");
+        component.setParent(new HtmlForm());
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlMessageTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlMessageTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlMessageTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlMessageTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlMessageTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlMessageTest(String name)
+    {
+        super(name);
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define required panel group
+        HtmlPanelGroup panelGroup = new HtmlPanelGroup();
+
+        // Define the referenced component
+        UIComponent referencedComponent = new HtmlInputText();
+        referencedComponent.setId("referencedComponent");
+        //referencedComponent.setParent(panelGroup);
+        panelGroup.getChildren().add(referencedComponent);
+        facesContext.addMessage(referencedComponent.getId(), new FacesMessage(
+                FacesMessage.SEVERITY_ERROR, "summary", "detail"));
+
+        // Define the component
+        HtmlMessage component = new HtmlMessage();
+        component.setId("TestComponent");
+
+        referencedComponent.setParent(panelGroup);
+        panelGroup.getChildren().add(component);
+        component.setFor(referencedComponent.getId());
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, panelGroup);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlMessagesTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlMessagesTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlMessagesTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlMessagesTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlMessagesTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlMessagesTest(String name)
+    {
+        super(name);
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define required panel group
+        HtmlPanelGroup panelGroup = new HtmlPanelGroup();
+
+        // Define the referenced component
+        UIComponent referencedComponent = new HtmlInputText();
+        referencedComponent.setId("referencedComponent");
+        //referencedComponent.setParent(panelGroup);
+        panelGroup.getChildren().add(referencedComponent);
+        facesContext.addMessage(referencedComponent.getId(), new FacesMessage(
+                FacesMessage.SEVERITY_ERROR, "summary", "detail"));
+
+        // Define the component
+        HtmlMessages component = new HtmlMessages();
+        component.setId("TestComponent");
+
+        referencedComponent.setParent(panelGroup);
+        panelGroup.getChildren().add(component);
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlOutputLabelTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlOutputLabelTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlOutputLabelTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlOutputLabelTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlOutputLabelTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlOutputLabelTest(String name)
+    {
+        super(name);
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define the component
+        UIComponent component = new HtmlOutputLabel();
+        component.setId("TestComponent");
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlOutputTextTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlOutputTextTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlOutputTextTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlOutputTextTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlOutputTextTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlOutputTextTest(String name)
+    {
+        super(name);
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define the component
+        UIComponent component = new HtmlOutputText();
+        component.setId("TestComponent");
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlPanelGridTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlPanelGridTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlPanelGridTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlPanelGridTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlPanelGridTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlPanelGridTest(String name)
+    {
+        super(name);
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define the component
+        UIComponent component = new HtmlPanelGrid();
+        component.setId("TestComponent");
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlPanelGroupTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlPanelGroupTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlPanelGroupTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlPanelGroupTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlPanelGroupTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlPanelGroupTest(String name)
+    {
+        super(name);
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define the component
+        UIComponent component = new HtmlPanelGroup();
+        component.setId("TestComponent");
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectBooleanCheckboxTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectBooleanCheckboxTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectBooleanCheckboxTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectBooleanCheckboxTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.html.HtmlForm;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlSelectBooleanCheckboxTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlSelectBooleanCheckboxTest(String name)
+    {
+        super(name);
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define the component
+        UIComponent component = new HtmlSelectBooleanCheckbox();
+        component.setId("TestComponent");
+        component.setParent(new HtmlForm());
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyCheckboxRendererCactus.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyCheckboxRendererCactus.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyCheckboxRendererCactus.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyCheckboxRendererCactus.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,376 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.FactoryFinder;
+import javax.faces.application.Application;
+import javax.faces.application.ViewHandler;
+import javax.faces.component.UISelectItems;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.faces.context.FacesContextFactory;
+import javax.faces.lifecycle.Lifecycle;
+import javax.faces.lifecycle.LifecycleFactory;
+import javax.faces.model.SelectItem;
+
+import org.apache.cactus.ServletTestCase;
+import org.apache.cactus.WebRequest;
+import org.apache.cactus.WebResponse;
+import org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlResponseWriterImpl;
+import org.apache.myfaces.renderkit.html.ext.HtmlCheckboxRenderer;
+
+/**
+ * Cactus test for the rendering of the
+ * {@link org.apache.myfaces.component.html.ext.HtmlSelectBooleanCheckbox}
+ * component.  Various combinations of layouts (lineDirection,pageDirection)
+ * and layoutWidths are tested.
+ * TODO: Test the markup generated when SelectItemGroup's are used in
+ *       combination with different layouts and layoutWidths.
+ * @author Ken Weiner
+ */
+public class HtmlSelectManyCheckboxRendererCactus extends ServletTestCase
+{
+    private FacesContext facesContext;
+    private UIViewRoot viewRoot;
+
+    public void setUp() throws Exception
+    {
+        FacesContextFactory facesContextFactory = (FacesContextFactory) FactoryFinder
+                .getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
+        LifecycleFactory lifecycleFactory = (LifecycleFactory) FactoryFinder
+                .getFactory(FactoryFinder.LIFECYCLE_FACTORY);
+        Lifecycle lifecycle = lifecycleFactory
+                .getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
+        facesContext = facesContextFactory.getFacesContext(this.config
+                .getServletContext(), request, response, lifecycle);
+        assertNotNull(facesContext);
+
+        Writer htmlResponseWriter = response.getWriter();
+        facesContext.setResponseWriter(new HtmlResponseWriterImpl(
+                htmlResponseWriter, "text/html", "ISO-8859-1"));
+
+        Application application = facesContext.getApplication();
+        ViewHandler viewHandler = application.getViewHandler();
+        String viewId = "/index.jsp";
+        viewRoot = viewHandler.createView(facesContext, viewId);
+        viewRoot.setViewId(viewId);
+        facesContext.setViewRoot(viewRoot);
+    }
+
+    public void beginEncodeWithLineDirection(WebRequest request)
+    {
+        // Nothing to do
+    }
+
+    public void testEncodeWithLineDirection() throws IOException
+    {
+        // Make component and set its properties
+        HtmlSelectManyCheckbox selectMany = new HtmlSelectManyCheckbox();
+        selectMany.setId("test");
+        selectMany.setLayout("lineDirection");
+        selectMany.setValue(getSelections(2));
+        UISelectItems uiSelectItems = new UISelectItems();
+        uiSelectItems.setParent(selectMany);
+        uiSelectItems.setValue(getSelectManyCheckboxSelections(3));
+        selectMany.getChildren().add(uiSelectItems);
+
+        // Make a renderer, associate it with component, and call encode
+        HtmlCheckboxRenderer renderer = new HtmlCheckboxRenderer();
+        renderer.encodeBegin(facesContext, selectMany);
+        renderer.encodeEnd(facesContext, selectMany);
+    }
+
+    public void endEncodeWithLineDirection(WebResponse response)
+    {
+        // Check the markup produced by the component
+        String htmlMarkup = response.getText();
+        String expected =
+            "<table id=\"test\">" +
+            "<tr>" +
+            "<td>" +
+            "<label>" +
+            "<input type=\"checkbox\" name=\"test\" checked=\"checked\" value=\"Value-0\" />" +
+            "&#160;Label-0" +
+            "</label>" +
+            "</td>" +
+            "<td>" +
+            "<label>" +
+            "<input type=\"checkbox\" name=\"test\" checked=\"checked\" value=\"Value-1\" />" +
+            "&#160;Label-1" +
+            "</label>" +
+            "</td>" +
+            "<td>" +
+            "<label>" +
+            "<input type=\"checkbox\" name=\"test\" value=\"Value-2\" />" +
+            "&#160;Label-2" +
+            "</label>" +
+            "</td>" +
+            "</tr>" +
+            "</table>";
+        assertEquals(expected, htmlMarkup);
+    }
+
+    public void beginEncodeWithPageDirection(WebRequest request)
+    {
+        // Nothing to do
+    }
+
+    public void testEncodeWithPageDirection() throws IOException
+    {
+        // Make component and set its properties
+        HtmlSelectManyCheckbox selectMany = new HtmlSelectManyCheckbox();
+        selectMany.setId("test");
+        selectMany.setLayout("pageDirection");
+        selectMany.setValue(getSelections(2));
+        UISelectItems uiSelectItems = new UISelectItems();
+        uiSelectItems.setParent(selectMany);
+        uiSelectItems.setValue(getSelectManyCheckboxSelections(3));
+        selectMany.getChildren().add(uiSelectItems);
+
+        // Make a renderer, associate it with component, and call encode
+        HtmlCheckboxRenderer renderer = new HtmlCheckboxRenderer();
+        renderer.encodeBegin(facesContext, selectMany);
+        renderer.encodeEnd(facesContext, selectMany);
+    }
+
+    public void endEncodeWithPageDirection(WebResponse response)
+    {
+        // Check the markup produced by the component
+        String htmlMarkup = response.getText();
+        String expected =
+            "<table id=\"test\">" +
+            "<tr>" +
+            "<td>" +
+            "<label>" +
+            "<input type=\"checkbox\" name=\"test\" checked=\"checked\" value=\"Value-0\" />" +
+            "&#160;Label-0" +
+            "</label>" +
+            "</td>" +
+            "</tr>" +
+            "<tr>" +
+            "<td>" +
+            "<label>" +
+            "<input type=\"checkbox\" name=\"test\" checked=\"checked\" value=\"Value-1\" />" +
+            "&#160;Label-1" +
+            "</label>" +
+            "</td>" +
+            "</tr>" +
+            "<tr>" +
+            "<td>" +
+            "<label>" +
+            "<input type=\"checkbox\" name=\"test\" value=\"Value-2\" />" +
+            "&#160;Label-2" +
+            "</label>" +
+            "</td>" +
+            "</tr>" +
+            "</table>";
+        assertEquals(expected, htmlMarkup);
+    }
+
+    public void beginEncodeWithLineDirectionAndLayoutWidth(WebRequest request)
+    {
+        // Nothing to do
+    }
+
+    public void testEncodeWithLineDirectionAndLayoutWidth() throws IOException
+    {
+        // Make component and set its properties
+        HtmlSelectManyCheckbox selectMany = new HtmlSelectManyCheckbox();
+        selectMany.setId("test");
+        selectMany.setLayout("lineDirection");
+        selectMany.setLayoutWidth("2");
+        selectMany.setValue(getSelections(2));
+        UISelectItems uiSelectItems = new UISelectItems();
+        uiSelectItems.setParent(selectMany);
+        uiSelectItems.setValue(getSelectManyCheckboxSelections(5));
+        selectMany.getChildren().add(uiSelectItems);
+
+        // Make a renderer, associate it with component, and call encode
+        HtmlCheckboxRenderer renderer = new HtmlCheckboxRenderer();
+        renderer.encodeBegin(facesContext, selectMany);
+        renderer.encodeEnd(facesContext, selectMany);
+    }
+
+    public void endEncodeWithLineDirectionAndLayoutWidth(WebResponse response)
+    {
+        // Check the markup produced by the component
+        String htmlMarkup = response.getText();
+        String expected =
+            "<table id=\"test\">" +
+            "<tr>" +
+            "<td>" +
+            "<label>" +
+            "<input type=\"checkbox\" name=\"test\" checked=\"checked\" value=\"Value-0\" />" +
+            "&#160;Label-0" +
+            "</label>" +
+            "</td>" +
+            "<td>" +
+            "<label>" +
+            "<input type=\"checkbox\" name=\"test\" value=\"Value-2\" />" +
+            "&#160;Label-2" +
+            "</label>" +
+            "</td>" +
+            "<td>" +
+            "<label>" +
+            "<input type=\"checkbox\" name=\"test\" value=\"Value-4\" />" +
+            "&#160;Label-4" +
+            "</label>" +
+            "</td>" +
+            "</tr>" +
+            "<tr>" +
+            "<td>" +
+            "<label>" +
+            "<input type=\"checkbox\" name=\"test\" checked=\"checked\" value=\"Value-1\" />" +
+            "&#160;Label-1" +
+            "</label>" +
+            "</td>" +
+            "<td>" +
+            "<label>" +
+            "<input type=\"checkbox\" name=\"test\" value=\"Value-3\" />" +
+            "&#160;Label-3" +
+            "</label>" +
+            "</td>" +
+            "<td>" +
+            // empty cell
+            "</td>" +
+            "</tr>" +
+            "</table>";
+        assertEquals(expected, htmlMarkup);
+    }
+
+    public void beginEncodeWithPageDirectionAndLayoutWidth(WebRequest request)
+    {
+        // Nothing to do
+    }
+
+    public void testEncodeWithPageDirectionAndLayoutWidth() throws IOException
+    {
+        // Make component and set its properties
+        HtmlSelectManyCheckbox selectMany = new HtmlSelectManyCheckbox();
+        selectMany.setId("test");
+        selectMany.setLayout("pageDirection");
+        selectMany.setLayoutWidth("2");
+        selectMany.setValue(getSelections(2));
+        UISelectItems uiSelectItems = new UISelectItems();
+        uiSelectItems.setParent(selectMany);
+        uiSelectItems.setValue(getSelectManyCheckboxSelections(5));
+        selectMany.getChildren().add(uiSelectItems);
+
+        // Make a renderer, associate it with component, and call encode
+        HtmlCheckboxRenderer renderer = new HtmlCheckboxRenderer();
+        renderer.encodeBegin(facesContext, selectMany);
+        renderer.encodeEnd(facesContext, selectMany);
+    }
+
+    public void endEncodeWithPageDirectionAndLayoutWidth(WebResponse response)
+    {
+        // Check the markup produced by the component
+        String htmlMarkup = response.getText();
+        String expected =
+            "<table id=\"test\">" +
+            "<tr>" +
+            "<td>" +
+            "<label>" +
+            "<input type=\"checkbox\" name=\"test\" checked=\"checked\" value=\"Value-0\" />" +
+            "&#160;Label-0" +
+            "</label>" +
+            "</td>" +
+            "<td>" +
+            "<label>" +
+            "<input type=\"checkbox\" name=\"test\" checked=\"checked\" value=\"Value-1\" />" +
+            "&#160;Label-1" +
+            "</label>" +
+            "</td>" +
+            "</tr>" +
+            "<tr>" +
+            "<td>" +
+            "<label>" +
+            "<input type=\"checkbox\" name=\"test\" value=\"Value-2\" />" +
+            "&#160;Label-2" +
+            "</label>" +
+            "</td>" +
+            "<td>" +
+            "<label>" +
+            "<input type=\"checkbox\" name=\"test\" value=\"Value-3\" />" +
+            "&#160;Label-3" +
+            "</label>" +
+            "</td>" +
+            "</tr>" +
+            "<tr>" +
+            "<td>" +
+            "<label>" +
+            "<input type=\"checkbox\" name=\"test\" value=\"Value-4\" />" +
+            "&#160;Label-4" +
+            "</label>" +
+            "</td>" +
+            "<td>" +
+            // empty cell
+            "</td>" +
+            "</tr>" +
+            "</table>";
+        assertEquals(expected, htmlMarkup);
+    }
+
+    /**
+     * Helper method to generate list of selected checkbox
+     * values.  The values will be strings in the form
+     * "Value-X" where X is the 0-based index of the value.
+     * @param numSelected the number of values requested
+     * @return the list of selected checkbox values
+     */
+    protected List getSelections(int numSelected)
+    {
+        List selectedValues = new ArrayList(numSelected);
+        for (int i = 0; i < numSelected; i++)
+        {
+            selectedValues.add("Value-" + i);
+        }
+        return selectedValues;
+    }
+
+    /**
+     * Helper method to generate list of select items that
+     * represent the selection of checkboxes.
+     * The select items will have labels and values in the form
+     * "Label-X", "Value-X" where X is the 0-based index of
+     * the label or value.
+     * @param numItems the number of checkboxes requested
+     * @return the list of checkbox select items
+     */
+    protected List getSelectManyCheckboxSelections(int numItems)
+    {
+        List selectItems = new ArrayList(numItems);
+        for (int i = 0; i < numItems; i++)
+        {
+            selectItems.add(new SelectItem("Value-" + i, "Label-" + i));
+        }
+        return selectItems;
+    }
+
+    public void tearDown()
+    {
+        facesContext = null;
+        viewRoot = null;
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyCheckboxTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyCheckboxTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyCheckboxTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyCheckboxTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.html.HtmlForm;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlSelectManyCheckboxTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlSelectManyCheckboxTest(String name)
+    {
+        super(name);
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define the component
+        UIComponent component = new HtmlSelectManyCheckbox();
+        component.setId("TestComponent");
+        component.setParent(new HtmlForm());
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyListboxTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyListboxTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyListboxTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyListboxTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.html.HtmlForm;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlSelectManyListboxTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlSelectManyListboxTest(String name)
+    {
+        super(name);
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define the component
+        UIComponent component = new HtmlSelectManyCheckbox();
+        component.setId("TestComponent");
+        component.setParent(new HtmlForm());
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyMenuTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyMenuTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyMenuTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectManyMenuTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.html.HtmlForm;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlSelectManyMenuTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlSelectManyMenuTest(String name)
+    {
+        super(name);
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define the component
+        UIComponent component = new HtmlSelectManyMenu();
+        component.setId("TestComponent");
+        component.setParent(new HtmlForm());
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectOneListboxTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectOneListboxTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectOneListboxTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectOneListboxTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.html.HtmlForm;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlSelectOneListboxTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlSelectOneListboxTest(String name)
+    {
+        super(name);
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define the component
+        UIComponent component = new HtmlSelectOneListbox();
+        component.setId("TestComponent");
+        component.setParent(new HtmlForm());
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectOneMenuTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectOneMenuTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectOneMenuTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectOneMenuTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.html.HtmlForm;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlSelectOneMenuTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlSelectOneMenuTest(String name)
+    {
+        super(name);
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define the component
+        UIComponent component = new HtmlSelectOneMenu();
+        component.setId("TestComponent");
+        component.setParent(new HtmlForm());
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectOneRadioTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectOneRadioTest.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectOneRadioTest.java (added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlSelectOneRadioTest.java Thu Jun 17 23:57:54 2010
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component.html.ext;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.html.HtmlForm;
+
+import junit.framework.Test;
+
+import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
+import org.apache.myfaces.test.utils.TestUtils;
+
+public class HtmlSelectOneRadioTest extends AbstractTomahawkViewControllerTestCase
+{
+
+    public HtmlSelectOneRadioTest(String name)
+    {
+        super(name);
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public static Test suite()
+    {
+        return null; // keep this method or maven won't run it
+    }
+
+    /**
+     * Verify component renders with the default renderer.
+     */
+    public void testDefaultRenderer()
+    {
+        // Define the component
+        UIComponent component = new HtmlSelectOneRadio();
+        component.setId("TestComponent");
+        component.setParent(new HtmlForm());
+
+        // Render the component
+        try
+        {
+            TestUtils.renderComponent(facesContext, component);
+        }
+        catch (IOException e)
+        {
+            fail(e.getMessage());
+        }
+
+        // Verify component was rendered
+        assertIdExists(component.getId());
+    }
+}

Modified: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/calendar/HtmlCalendarRendererTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/calendar/HtmlCalendarRendererTest.java?rev=955793&r1=955792&r2=955793&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/calendar/HtmlCalendarRendererTest.java (original)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/custom/calendar/HtmlCalendarRendererTest.java Thu Jun 17 23:57:54 2010
@@ -74,7 +74,7 @@ public class HtmlCalendarRendererTest ex
     
     public void testHtmlPropertyPassTru() throws Exception
     {
-        HtmlRenderedAttr[] attrs = HtmlCheckAttributesUtil.generateBasicAttrs();       
+        HtmlRenderedAttr[] attrs = HtmlCheckAttributesUtil.generateBasicAttrs(); 
         
         inputCalendar.setRenderAsPopup(true);
         



Mime
View raw message