1 package com.google.inject.persist; 2 3 import com.google.inject.AbstractModule; 4 import com.google.inject.Guice; 5 import com.google.inject.Stage; 6 import com.google.inject.persist.jpa.JpaPersistModule; 7 import java.util.logging.Logger; 8 import junit.framework.TestCase; 9 10 /** @author dhanji@google.com (Dhanji R. Prasanna) */ 11 public class EdslTest extends TestCase { 12 testModuleConfigUsingJpa()13 public void testModuleConfigUsingJpa() throws Exception { 14 Logger.getLogger(getClass().getName()).info("Starting EDSL test."); 15 Guice.createInjector( 16 Stage.PRODUCTION, 17 new AbstractModule() { 18 @Override 19 protected void configure() { 20 install(new JpaPersistModule("myunit")); 21 binder().requireExplicitBindings(); 22 } 23 }); 24 Logger.getLogger(getClass().getName()).info("Completed EDSL test."); 25 } 26 } 27