[jboss-user] [JBoss Seam] - Re: Need help with SeamTest

francof do-not-reply at jboss.com
Tue Jul 10 15:57:52 EDT 2007


I found this post 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4010462#4010462

I forgot to add earlier - I'm using Seam 1.2.1

Following the suggestions everything works ok only if I my test class does not extend SeamTest - if it's a pure TestNG test it works fine. 

OK
public class CatalogTest   {
	private Catalog catalog;

	private EntityManagerFactory emf;

	public EntityManagerFactory getEntityManagerFactory() {
		return emf;
	}

	@Configuration(beforeTestClass = true)
	public void init() {
		emf = Persistence
				.createEntityManagerFactory("cast");
	}

}

FAILED
public class CatalogTest  extends SeamTest {
	private Catalog catalog;

	private EntityManagerFactory emf;

	public EntityManagerFactory getEntityManagerFactory() {
		return emf;
	}

	@Configuration(beforeTestClass = true)
	public void init() {
		emf = Persistence
				.createEntityManagerFactory("cast");
	}

}



Basically, all I'm trying to attempt is test that the entity POJO saves to my database and I was following the steps in the reference guide. 
Matt / Clive - hoping you guys have a few minutes to respond.




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062667#4062667

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062667



More information about the jboss-user mailing list