Package org.jboss.errai.enterprise.client.cdi

Source Code of org.jboss.errai.enterprise.client.cdi.AbstractErraiCDITest

package org.jboss.errai.enterprise.client.cdi;

import org.jboss.errai.enterprise.client.cdi.api.CDI;
import org.jboss.errai.ioc.client.api.Bootstrapper;

import com.google.gwt.core.client.GWT;
import com.google.gwt.junit.client.GWTTestCase;

/**
* Abstract base class of all Errai CDI integration tests,
* used to bootstrap our IOC container and CDI module.
*
* @author Christian Sadilek <csadilek@redhat.com>
*/
public abstract class AbstractErraiCDITest extends GWTTestCase {

  @Override
  public void gwtSetUp() throws Exception {
    super.gwtSetUp();

    CDI.removePostInitTasks();

    Bootstrapper bootstrapper = GWT.create(Bootstrapper.class);
    bootstrapper.bootstrapContainer();

    // Unfortunately, GWTTestCase does not call our inherited module's onModuleLoad() methods
    // http://code.google.com/p/google-web-toolkit/issues/detail?id=3791
    new CDIClientBootstrap().onModuleLoad();
  }
}
TOP

Related Classes of org.jboss.errai.enterprise.client.cdi.AbstractErraiCDITest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.