Subject auto-creation?

1 view
Skip to first unread message

Jeremy Mawson

unread,
Nov 8, 2008, 11:04:25 PM11/8/08
to instin...@googlegroups.com
G'day

Just a quick question ... is subject auto-creation implemented? I've
never seen it working. Even with @Subject(implementation = ...) I get
NPEs when trying to use the subject.

Jem

Tom Adams

unread,
Nov 9, 2008, 5:02:38 PM11/9/08
to instin...@googlegroups.com
Hey,

Short answer: It's "implemented" but not hooked up.

Long answer...

A while back I rewrote all the actor auto creation code and test drove
a bunch of it. I basically never got the subject creation completed.
It is there (TestSubjectAutoCreator?) in the test tree, but I didn't
consider it good enough, or of the right design to move over into the
production tree. It's also pretty stupid, you've got to give it hints
to find the right implementation to instantiate and it doesn't
automatically hook in mocks & stubs if they're exposed in the
constructor of the subject (i.e. in a DI-fashion). Take a look in the
Instinct test code for examples of how it's used.

It wouldn't be too hard to get a basic version working, it was more
that I wanted to get the other actors working fully first before
moving on to it. It's been used for probably a good 6 months though in
the Instinct tests & specs though, so it's probably good enough to
hook in, once the design is munged over to a similar design as the
other actor creators.

Tom

--
tom adams | e:tomjadams<at>gmail.com

Jem

unread,
Nov 9, 2008, 6:03:30 PM11/9/08
to instin...@googlegroups.com
Thanks Tom

I will try to take a gander at this at some stage.

Just a quick note to let you know that I've checked in the InstinctReportAntTask and will get around to documenting it on the wiki (hopefully in the next few days). The task is hooked into the example project build.

Cheers
Jem



2008/11/10 Tom Adams <tomj...@gmail.com>



--
http://mawson.wordpress.com/

Tom Adams

unread,
Nov 9, 2008, 6:34:00 PM11/9/08
to instin...@googlegroups.com
Hey Jem,

That's excellent! Thanks.

Tom

Reply all
Reply to author
Forward
0 new messages