-
Notifications
You must be signed in to change notification settings - Fork 722
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4663 from nunit/Issue4659_Naming
Add support for Exceptions for Display Name
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt | ||
|
||
using System; | ||
|
||
namespace NUnit.Framework.Tests | ||
{ | ||
[FixtureLifeCycle(LifeCycle.InstancePerTestCase)] | ||
internal sealed class Issue4659 | ||
{ | ||
[TestCaseSource(nameof(GetSomeExceptionCases))] | ||
public void NoMethod_GivenException_ShouldPassTest(Exception testCase) => Assert.That(testCase, Is.Not.InstanceOf<string>()); | ||
|
||
private static TestCaseData[] GetSomeExceptionCases() => new[] | ||
{ | ||
new TestCaseData(new ArgumentNullException()), | ||
new TestCaseData(new ArgumentNullException("message", new Exception("Some Exception Message"))), | ||
}; | ||
} | ||
} |