MentaContainer

Compare Revisions

Ignore whitespace Rev 50 → Rev 51

/trunk/src/test/java/org/mentacontainer/impl/MentaComponentTest.java
41,19 → 41,4
Assert.assertTrue(!u1.getUsername().equals(u2.getUsername()));
}
@Test
public void testSingleton() {
Component c1 = new MentaComponent(User.class, true).addInitValue("saoj");
User u1 = c1.getInstance();
User u2 = c1.getInstance();
Assert.assertTrue(u1 == u2);
Assert.assertTrue(u1.getUsername().equals(u2.getUsername()));
}
}