package org.richfaces.component.html;

import javax.faces.context.FacesContext;

import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;

import junit.framework.TestCase;

public class HtmlPanel2Test extends AbstractAjax4JsfTestCase {

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

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

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

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

}
