Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
This file is part of Port@l Port@l 3.0 - Portal Engine and Management System Copyright (C) 2010 Isotrol, SA. http://www.isotrol.com Port@l is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Port@l is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Port@l. If not, see <http://www.gnu.org/licenses/>.
 
 
 package com.isotrol.impe3.test;
 
 
 import static junit.framework.Assert.assertTrue;
 
 
 
Abstract base class for IMPE3 component.

Parameters:
<T> Component type.
Author(s):
Andres Rodriguez
 
 public final class ComponentTester<T extends Component> {
 	private final ComponentDefinition<T> definition;
 	private final TestModel model;
 	private final T component;
 
 	private static HTMLTemplate html = new HTMLTemplate();

Default Constructor.
 
 	static <T extends ComponentComponentTester<T> of(Class<T> type, T componentfinal TestModel model) {
 		return new ComponentTester<T>(ComponentDefinition.of(type), componentmodel);
 	}

Default Constructor.
 
 	private ComponentTester(final ComponentDefinition<T> definition, T componentfinal TestModel model) {
 		this. = definition;
 		this. = component;
 		this. = model;
 	}
 
 	public T getComponent() {
 		return ;
 	}
 
 	private void inject() {
 		ComponentInjector.inject(.getContext());
 	}

Execute.
 
 	public ComponentResponse execute() throws Exception {
 		inject();
 		return .execute();
 	}

Execute and Asserts that component execution was successfull
 
 	public void executeOk() {
 		try {
 		} catch (Exception e) {
 			Assert.fail();
 		}
 	}

Execute in edit mode
 
 	public void edit() {
 		inject();
 		assertTrue(true);
 	}

Do renderization of component execution
	public void renderHTML() {
		final OutputStream out = .;
		.render(rendereroutrc);
	}

Just execute and render
	public void executeAndRenderHTML() {
	}

Just execute in edit mode and render
	public void editAndRenderHTML() {
	}
New to GrepCode? Check out our FAQ X