MentaContainer

Compare Revisions

Regard whitespace Rev 40 → Rev 41

/trunk/src/test/java/org/mentacontainer/impl/GenericComponentTest.java
29,11 → 29,11
c.ioc("myFactory", generic);
String s1 = (String) c.get("myFactory");
String s1 = c.get("myFactory");
Thread.sleep(5); // so strings are different... my cpu is fast! :-)
String s2 = (String) c.get("myFactory");
String s2 = c.get("myFactory");
Assert.assertNotNull(s1);
Assert.assertNotNull(s2);
/trunk/src/test/java/org/mentacontainer/impl/MentaComponentTest.java
33,9 → 33,9
Component c2 = new MentaComponent(User.class).addProperty("username", "soliveira");
User u1 = (User) c1.getInstance();
User u1 = c1.getInstance();
User u2 = (User) c2.getInstance();
User u2 = c2.getInstance();
Assert.assertTrue(u1 != u2);
47,9 → 47,9
Component c1 = new MentaComponent(User.class, true).addInitValue("saoj");
User u1 = (User) c1.getInstance();
User u1 = c1.getInstance();
User u2 = (User) c1.getInstance();
User u2 = c1.getInstance();
Assert.assertTrue(u1 == u2);
/trunk/src/test/java/org/mentacontainer/impl/MentaContainerTest.java
16,9 → 16,9
 
Assert.assertEquals("", c.get("myStr"));
 
String s1 = (String) c.get("myStr");
String s1 = c.get("myStr");
 
String s2 = (String) c.get("myStr");
String s2 = c.get("myStr");
 
Assert.assertTrue(s1 != s2);
 
34,9 → 34,9
 
Assert.assertEquals("hello", c.get("myStr"));
 
String s1 = (String) c.get("myStr");
String s1 = c.get("myStr");
 
String s2 = (String) c.get("myStr");
String s2 = c.get("myStr");
 
Assert.assertTrue(s1 != s2);
 
44,7 → 44,7
 
c.ioc("anotherStr", String.class).addInitValue("hi");
 
String s3 = (String) c.get("anotherStr");
String s3 = c.get("anotherStr");
 
Assert.assertTrue(s1 != s3);
 
60,9 → 60,9
 
Assert.assertEquals("hello", c.get("myStr"));
 
String s1 = (String) c.get("myStr");
String s1 = c.get("myStr");
 
String s2 = (String) c.get("myStr");
String s2 = c.get("myStr");
 
Assert.assertTrue(s1 == s2);
 
181,7 → 181,7
Container c = getConfiguredContainer();
MyDAO myDAO = (MyDAO) c.get("myDAO");
MyDAO myDAO = c.get("myDAO");
// check implementation...