nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #02596
[Bug 928421] Re: No ProjectService instantiated in CreateDomain
There are a couple of problems with this bug and the proposed patch...
1. DomainManager and ProjectService are two internal services used by
NUnit. Services never instantiate other services, since that would
require them to know about the existence of other services. All
services must be created before any of them are initialized. NUnit
does this in each of it's main executables. It's fine for a single
service like DomainManager to be instantiated and executed on its own
if you need it. That's how we test it, in fact. But if you need
multiple services, you should create and initialize them all in one
place, following a pattern similar to that used in the console runner.
2. But more significantly, it's not clear why the NAnt task needs this
service at all. It uses a TestPackage to describe the tests to be run.
A TestPackage never contains an NUnit project but has a list of
assemblies. Can you explain how it is that the ProjectService ends up
being required?
Charlie
--
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/928421
Title:
No ProjectService instantiated in CreateDomain
Status in NUnit V2 Test Framework:
New
Bug description:
monodevelop was ported to nunit 2.5 in ubuntu.
Unfortunatly it does not work properly to ProjectService being null in the CreateDomain call, leading to NullReference exception.
see bug 889241
I'm not very familiar with the code, so I can't judge if monodevelop is using nunit wrong, it is a bug in porting it to 2.5 or a bug in nunit 2.5
The issue was introduced in nunit revision 3127
There is monodevelops use of CreateDomain:
http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/precise/monodevelop/precise/view/head:/src/addins/NUnit/Services/ExternalTestRunner.cs#L88
Attached a patch to nunit that appears to fix the issue.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nunitv2/+bug/928421/+subscriptions
References