Bug 3881 - [newresolver] nunit doesn't handle [TestCase()] very well
Summary: [newresolver] nunit doesn't handle [TestCase()] very well
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: NUnit ()
Version: 2.9.x
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-03-13 14:43 UTC by Stephen Shaw
Modified: 2012-03-14 03:37 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
TestCases seem to pass, but runner doesn't turn green (109.06 KB, image/png)
2012-03-13 14:47 UTC, Stephen Shaw
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Stephen Shaw 2012-03-13 14:43:17 UTC
If each test case passes it seems to be ok, but doesn't update the circle to green.  If the test case fails, it causes an exception to be thrown.

pass:
    I'll attach a screenshot.

fail:

Exception rethrown at [0]: 
 ---> System.Runtime.Remoting.RemotingException: Connection closed
  at Mono.Remoting.Channels.Unix.UnixMessageIO.StreamRead (System.IO.Stream networkStream, System.Byte[] buffer, Int32 count) [0x0002c] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/Mono.Posix/Mono.Remoting.Channels.Unix/UnixMessageIO.cs:99 
  at Mono.Remoting.Channels.Unix.UnixMessageIO.ReceiveMessageStatus (System.IO.Stream networkStream, System.Byte[] buffer) [0x00000] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/Mono.Posix/Mono.Remoting.Channels.Unix/UnixMessageIO.cs:57 
  --- End of inner exception stack trace ---
  at Mono.Remoting.Channels.Unix.UnixMessageIO.ReceiveMessageStatus (System.IO.Stream networkStream, System.Byte[] buffer) [0x0000f] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/Mono.Posix/Mono.Remoting.Channels.Unix/UnixMessageIO.cs:59 
  at Mono.Remoting.Channels.Unix.UnixClientTransportSink.ProcessMessage (IMessage msg, ITransportHeaders requestHeaders, System.IO.Stream requestStream, ITransportHeaders& responseHeaders, System.IO.Stream& responseStream) [0x0004f] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/Mono.Posix/Mono.Remoting.Channels.Unix/UnixClientTransportSink.cs:176 
  at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage (IMessage msg) [0x0006c] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/BinaryClientFormatterSink.cs:157 
The application was terminated by a signal: SIGHUP
Comment 1 Stephen Shaw 2012-03-13 14:44:37 UTC
Test case:

// by default this passes.  Just change one of the test cases to cause a fail.
// "2" -> "3"

using System;

namespace FizzBuzz
{	
	public class Translator
	{
		public static string Translate (int i)
		{
			return i.ToString ();
		}
	}
}


using System;
using NUnit.Framework;

namespace FizzBuzz
{
	[TestFixture]
	public class FizzBuzzTests
	{
		[TestCase(1, "1")]
		[TestCase(2, "2")]
		public void Translate (int input, string expected)
		{
			string result = Translator.Translate (input);
			Assert.That (result, Is.EqualTo(expected));
		}
	}
}
Comment 2 Stephen Shaw 2012-03-13 14:47:05 UTC
Created attachment 1511 [details]
TestCases seem to pass, but runner doesn't turn green
Comment 3 Stephen Shaw 2012-03-13 14:50:09 UTC
Ok, not sure what happened, but now it doesn't crash with bad testcases.  It does update all of the circles to be half green and half red, but each test case color doesn't update.

new TestCases are:

[TestCase(1, "1")]
[TestCase(2, "2")]
[TestCase(3, "Fizz")]
Comment 4 Mike Krüger 2012-03-14 03:37:33 UTC
fixed.