[Mono-list] NUnit and gnunit problems

Gonzalo Paniagua Javier gonzalo@ximian.com
Sat, 10 Apr 2004 08:31:10 +0200


El jue, 08-04-2004 a las 10:35, Pedro Santos escribió:
[...]
> Then I tried a simple test program:
> 
> using System;
> using NUnit.Framework;
> 
> [TestFixture]
> public class TextF {
> 	[Test]
> 	public void buu()
> 	{
> 		Assert.IsTrue(true);
> 	}
> };
> 
> Compiled:
> 
> bash-2.05b$ mcs a.cs -r:nunit.framework.dll -t:library
> Compilation succeeded
> 
> But when I run it:
> 
> //----------------------------------------------------------------
> bash-2.05b$ mono
> ../../downloads/www/nunit/NUnit-2.1.5/bin/nunit-console.exe a.dll
> 
> NUnit version 2.1.5
> Copyright (C) 2002-2003 James W. Newkirk, Michael C. Two, Alexei A.
> Vorontsov, C harlie Poole.
> Copyright (C) 2000-2003 Philip Craig.
> All Rights Reserved.
>  
> OS Version: Unix 5.1.2600.0    Mono Version: 1.1.4322.573
>  
> .
> Tests run: 1, Failures: 0, Not run: 0, Time: 0.055477 seconds
>  
> 
> 
> Unhandled Exception: System.NullReferenceException: A null value was
> found where an object instance was required.

nunit-console uses Assembly.Load, which looks for assemblies in the
default paths for mono, not in the current directory. If you want mono
to do it, just 'export MONO_PATH=.:$MONO_PATH' and it will work.

-Gonzalo