PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 6package org.sigmah.test;
 7
 8import com.google.inject.Inject;
 9import org.junit.Assert;
10import org.junit.Test;
11import org.junit.runner.RunWith;
12
13import javax.persistence.EntityManager;
14
15@RunWith(InjectionSupport.class)
16@Modules(MockHibernateModule.class)
17public class TestScopeTest {
18
19    @Inject
20    private EntityManager em1;
21
22
23    @Inject
24    private EntityManager em2;
25
26    @Test
27    public void test() {
28        Assert.assertSame(em1, em2);
29    }
30
31}