[MonoDevelop] Unit test
Lluis Sanchez
lluis at ximian.com
Tue Mar 21 14:17:48 EST 2006
> Hi.
>
> The attached patch adds a unit test for namespace resolving to the
> CSharpBinding assembly. It does not do much yet, but should be easy to
> extend.
Nice! That's a good start.
>
> A few comments:
>
> * To run the tests type: make check (I had to add some templates to
> the CSharpBinding to ensure make check did not fail).
Those templates are not needed in CSharpBinding, they were moved to
MonoDevelop.IDE since they are not c#-specific.
> * Since Assembly.GetEntryAssembly() is null when an assembly is tested
> through NUnit, I had to check for this and use
> AppDomain.CurrentDomain.BaseDirectory in those situations.
I think it would be better to add a property somewhere (maybe in
PropertyService) which returns the entry assembly location, and use that
property in all other services, instead of adding the null check
everywhere.
> * The test assembly will have to be output in build/bin for the
> MonoDevelop runtime to work. Any suggestions for doing this another
> way are most welcome!
I think it is ok for now.
>
> Well, apart from this, I guess it is more or less self explanatory.
> Any comments? Is this ok to commit with appropriate ChangeLogs?
In the test setup, you shouldn't need to start the IDE. If you need a
parser database just create one using the ParserService:
IParserDatabase pdb = Services.ParserService.CreateParserDatabase ();
Lluis.
More information about the Monodevelop-list
mailing list