/sigmah/src/test/java/org/sigmah/test/TestScopeTest.java

http://sigma-h.googlecode.com/ · Java · 31 lines · 18 code · 9 blank · 4 comment · 0 complexity · dbcebb8b88cc219259252b1e4a6adc09 MD5 · raw file

  1. /*
  2. * All Sigmah code is released under the GNU General Public License v3
  3. * See COPYRIGHT.txt and LICENSE.txt.
  4. */
  5. package org.sigmah.test;
  6. import com.google.inject.Inject;
  7. import org.junit.Assert;
  8. import org.junit.Test;
  9. import org.junit.runner.RunWith;
  10. import javax.persistence.EntityManager;
  11. @RunWith(InjectionSupport.class)
  12. @Modules(MockHibernateModule.class)
  13. public class TestScopeTest {
  14. @Inject
  15. private EntityManager em1;
  16. @Inject
  17. private EntityManager em2;
  18. @Test
  19. public void test() {
  20. Assert.assertSame(em1, em2);
  21. }
  22. }