MentaContainer

Compare Revisions

Ignore whitespace Rev 138 → Rev 139

/trunk/src/test/java/org/mentacontainer/impl/MentaContainerTest.java
409,7 → 409,7
c.autowire("aDependency", "myDep");
c.ioc("someAction2", SomeAction2.class).addInitDependency("myDAO");
c.ioc("someAction2", SomeAction2.class).addConstructorDependency("myDAO");
SomeAction2 action = c.get("someAction2");
/trunk/src/test/java/org/mentacontainer/impl/ClassFactoryTest.java
66,7 → 66,7
c.ioc("myString", String.class).addInitValue("hello");
Factory c1 = new ClassFactory(c, TestObj1.class).addInitDependency("myString").addInitValue(20).addInitValue(30000L)
Factory c1 = new ClassFactory(c, TestObj1.class).addConstructorDependency("myString").addInitValue(20).addInitValue(30000L)
.addInitValue(new User("saoj"));
TestObj1 o = c1.getInstance();
/trunk/src/test/java/org/mentacontainer/example/CoreExamplesTest.java
62,7 → 62,7
c.ioc("username", String.class).addInitValue("saoj");
 
c.ioc("myString", String.class).addInitDependency("username");
c.ioc("myString", String.class).addConstructorDependency("username");
String myString = c.get("myString");
87,7 → 87,7
c.ioc("timeInMillis", Long.class).addInitValue(cal.getTimeInMillis());
c.ioc("myBirthdayMonth", Integer.class).addInitValue(0);
c.ioc("myBirthday", Date.class).addInitDependency("timeInMillis").addPropertyDependency("month", "myBirthdayMonth").addPropertyValue("date", 20);
c.ioc("myBirthday", Date.class).addConstructorDependency("timeInMillis").addPropertyDependency("month", "myBirthdayMonth").addPropertyValue("date", 20);
myBirthday = c.get("myBirthday");
161,7 → 161,7
c.ioc("timeInMillis2", Long.class).addInitValue(cal2.getTimeInMillis());
c.ioc("myBirthdayMonth", Integer.class).addInitValue(0);
c.ioc("myBirthday", Date.class).addPropertyValue("date", 20).addInitDependency("timeInMillis2");
c.ioc("myBirthday", Date.class).addPropertyValue("date", 20).addConstructorDependency("timeInMillis2");
c.autowire("timeInMillis");
c.autowire("myBirthdayMonth", "month");