| Priority |
Normal |
| Type | Feature |
| State | Fixed |
| Assignee | Victor Kropp |
| Subsystem | Unit Testing |
| Affected versions |
No affected versions
|
| Fixed in |
5.0
|
| Fixed in build |
Next build |
|
|
ReSharper 3.0.2 C# Edition build 3.0.517.8 on 2007-08-21T09:41:12
Using R# 4 EAP and TeamCity (not sure if TeamCity has same issue or not–we haven't tested it since it doesn't work in R#).
using System; using NUnit.Framework; namespace ClassLibrary1 { [TestFixture] public class Test { [Test, ExpectedException(typeof(Exception))] public void TestOkInResharperTestRunnerAndNUnit() { throw new Exception("Crash!"); } // false positive test failure [Test, ExpectedException(ExpectedMessage = "Crash!")] public void TestFailsInResharperTestRunnerButNotInNUnit() { throw new Exception("Crash!"); } } }[Test, ExpectedException] public void TestFailsInResharperTestRunnerButNotInNUnit() { throw new Exception("Crash!"); }This small is a false positive in Resharper Test runner. Maybe it is just the missing exception type?!
The bug was reported in Jun 07 ! But you're saying that we will have to wait 2 years to get it fixed??!
Since it's already coded for 5.0, perhaps you can merge it into a patch for 4.1 eh?
[Test, ExpectedException(typeof(ArgumentNullException), ExpectedMessage = "aParentContainer", MatchType = MessageMatch.Contains)]
The MatchType directive is ignored.
We had to wait a significant period of time for SetUpFixture support. By the time you have full NUnit 2.4.8 support. NUnit 2.5 will be out. You've got a GREAT product, but it annoys me that you don't seem to think the test runner is an important feature.
This problem can be worked around with NUnit 2.5 by using
Assert.Throws<Exception>(() => { your test code here });
or other variants of Assert.Throws
I've read the post here, http://www.jetbrains.net/devnet/thread/281286, that says to try the nightly builds for 4.5.1, but the latest from 7/11 didn't have this fixed. Any idea on when this will be done?
Thanks,
Boris.