All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jsftoolkit.test.AbstractUIComponentTest Maven / Gradle / Ivy

Go to download

The core classes for the JSF Toolkit Component Framework. Includes all framework base and utility classes as well as component kick-start/code-generation and registration tools. Also includes some classes for testing that are reused in other projects. They cannot be factored out into a separate project because they are referenced by the tests and they reference this code (circular dependence).

The newest version!
package com.jsftoolkit.test;

import javax.faces.component.UIComponent;

import org.apache.shale.test.base.AbstractJsfTestCase;

public abstract class AbstractUIComponentTest extends
		AbstractJsfTestCase {
	private Class componentClass;

	protected C component;

	public AbstractUIComponentTest(Class componentClass) {
		super("UIComponent Test");
		this.componentClass = componentClass;
	}

	@Override
	protected void setUp() throws Exception {
		super.setUp();
		component = componentClass.newInstance();
	}

	/**
	 * Only checks that save and restore do not throw exceptions
	 * 
	 * @throws Exception
	 */
	public void testSaveRestore() throws Exception {
		component.restoreState(facesContext, component.saveState(facesContext));
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy