package org.jboss.seam.example.contactlist.test;

import org.testng.annotations.Test;
import org.jboss.seam.mock.SeamTest;

public class NewFormTest extends SeamTest {

	@Test
	public void test() throws Exception {
		new FacesRequest() {
			@Override
			protected void updateModelValues() throws Exception {				
				//set form input to model attributes
				setValue("#{newForm.value}", "seam");
			}
			@Override
			protected void invokeApplication() {
				//call action methods here
				invokeMethod("#{newForm.newForm}");
			}
			@Override
			protected void renderResponse() {
				//check model attributes if needed
				assert getValue("#{newForm.value}").equals("seam");
			}
		}.run();
	}
}
