package org.richfaces.component.html;

import javax.faces.context.FacesContext;

import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;

import junit.framework.TestCase;

public class HtmlPanelTest extends AbstractAjax4JsfTestCase {

	public HtmlPanelTest(String name) {
		super(name);
	}

	public void setUp() throws Exception {
		super.setUp();
	}

	public void tearDown() throws Exception {
		super.tearDown();
	}

	public void testSaveStateFacesContext() {
		HtmlPanel panel = new HtmlPanel();
		panel.setBodyClass("panelBodyClass");
		panel.setHeaderClass("headerClass");
		Object state = panel.saveState(facesContext);
		HtmlPanel newPanel = new HtmlPanel();
		newPanel.restoreState(facesContext, state);
		assertEquals("panelBodyClass", newPanel.getBodyClass());
		assertEquals("headerClass", newPanel.getHeaderClass());
	}

}
