Bug 1097 - Passing unittests fails
Summary: Passing unittests fails
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: NUnit ()
Version: 2.6
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2011-09-28 08:24 UTC by Thomas Skovsende
Modified: 2012-03-16 05:14 UTC (History)
3 users (show)

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

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:

Description Thomas Skovsende 2011-09-28 08:24:10 UTC
I have a unittest with the following Assertion at the end:

Assert.Pass("No exception thrown");

When that test runs and gets to the Assert.Pass() call it fails with a NUnit.Framework.SuccessException
Comment 1 Mike Krüger 2011-09-29 01:25:56 UTC
Atm we support nunit 2.4.8 which doesn't have this assertion/exception.
Comment 2 Marek Safar 2011-11-15 14:18:32 UTC
Can you please provide a solution/project which reproduces the problem?
Comment 3 Anders Gustafsson 2012-03-16 03:30:07 UTC
I am experiencing the same problem running MonoDevelop 2.9.2 on Mac OSX. It is extremely simple to reproduce this problem. Simply create a unit test like this:

public void PleaseDoNotFail()
  Assert.Pass("Please do not fail!");

When running this unit test within MonoDevelop, the test will be reported as failed, and the test output is:

NUnit.Framework.SuccessException: Please do not fail!

It would improve my MonoDevelop experience very much if you could fix this issue.

As a comparison, the test is reported as passed when running the same test e.g. with the NUnit GUI or the Resharper VS integrated unit test component on Windows.
Comment 4 Mike Krüger 2012-03-16 05:14:41 UTC