fixed test

This commit is contained in:
Jonas Boner 2009-05-11 21:28:31 +02:00
parent b602a86eed
commit 4ad378b5c4
4 changed files with 111 additions and 116 deletions

View file

@ -57,10 +57,10 @@ class ActiveObjectGuiceConfiguratorForJava {
val activeObjectTuple = activeObjectRegistry.get(name)
val clazz = activeObjectTuple._1
val activeObjectProxy = activeObjectTuple._2
//activeObjectProxy.setTargetInstance(injector.getInstance(clazz).asInstanceOf[AnyRef])
val target = clazz.newInstance
injector.injectMembers(target)
activeObjectProxy.setTargetInstance(target.asInstanceOf[AnyRef])
activeObjectProxy.setTargetInstance(injector.getInstance(clazz).asInstanceOf[AnyRef])
//val target = clazz.newInstance
//injector.injectMembers(target)
//activeObjectProxy.setTargetInstance(target.asInstanceOf[AnyRef])
activeObjectFactory.newInstance(clazz, activeObjectProxy).asInstanceOf[T]
} else throw new IllegalStateException("Class " + name + " has not been put under supervision (by passing in the config to the supervise() method")
}