static troubles

15 views
Skip to first unread message

Ramon Smits

unread,
Apr 19, 2012, 3:43:29 PM4/19/12
to agath...@googlegroups.com


I am unit testing some code and this code reinitializes Agatha for each test. Currently the following code is resulting to troubles:


It has a static IContainer reference! Why? :-)

I need to set Agatha.Common.InversionOfControl.IoC = null after each test as a work-around.


My take on this is that this is a bug.



The Initialize method should probably check the local container data field instead of the static container instance.


I don't have access to my ssh keys at the moment so I can't create a patch. Will create one tomorrow.

--
Ramon

Davy Brion

unread,
Apr 22, 2012, 12:37:48 PM4/22/12
to agath...@googlegroups.com
The static IContainer property is used by the WcfRequestProcessor to resolve the actual IRequestProcessor, and by the RequestProcessor to resolve the request handlers.

Trying to remove the static property would require users to use a custom WCF service factory, which is a change I'm unwilling to accept, so I disagree on this being a bug :)
Reply all
Reply to author
Forward
0 new messages