Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding NUnit MultipleAssertException to default fail exceptions #501

Merged
merged 1 commit into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Allure.NUnit/Core/AllureNUnitHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ internal AllureNUnitHelper(ITest test)
AllureLifecycle.AllureConfiguration.FailExceptions ??= new()
{
typeof(NUnitException).FullName,
typeof(AssertionException).FullName
typeof(AssertionException).FullName,
typeof(MultipleAssertException).FullName
};
}

Expand Down
3 changes: 3 additions & 0 deletions Allure.Reqnroll/State/AllureReqnrollStateFacade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ static class AllureReqnrollStateFacade

const string ASSERT_EXC_NUNIT =
"NUnit.Framework.AssertionException";
const string ASSERT_EXC_NUNIT_MULTIPLE =
"NUnit.Framework.MultipleAssertException";
const string ASSERT_EXC_XUNIT_NEW = // From v2.4.2 and onward.
"Xunit.Sdk.IAssertionException";
const string ASSERT_EXC_XUNIT_OLD = // Prior to v2.4.2
Expand Down Expand Up @@ -46,6 +48,7 @@ internal static void Initialize()
Lifecycle.AllureConfiguration.FailExceptions ??= new()
{
ASSERT_EXC_NUNIT,
ASSERT_EXC_NUNIT_MULTIPLE,
ASSERT_EXC_XUNIT_NEW,
ASSERT_EXC_XUNIT_OLD,
ASSERT_EXC_MSTEST
Expand Down
5 changes: 4 additions & 1 deletion Allure.SpecFlow/AllureBindingInvoker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ internal class AllureBindingInvoker : BindingInvoker
"Allure.SpecFlowPlugin.HAS_PLACEHOLDER_TESTCASE";

const string ASSERT_EXC_NUNIT =
"NUnit.Framework.AssertionException";
"NUnit.Framework.AssertionException";
const string ASSERT_EXC_NUNIT_MULTIPLE =
"NUnit.Framework.MultipleAssertException";
const string ASSERT_EXC_XUNIT_NEW = // From v2.4.2 and onward.
"Xunit.Sdk.IAssertionException";
const string ASSERT_EXC_XUNIT_OLD = // Prior to v2.4.2
Expand Down Expand Up @@ -59,6 +61,7 @@ IUnitTestRuntimeProvider unitTestRuntimeProvider
AllureLifecycle.Instance.AllureConfiguration.FailExceptions ??= new()
{
ASSERT_EXC_NUNIT,
ASSERT_EXC_NUNIT_MULTIPLE,
ASSERT_EXC_XUNIT_NEW,
ASSERT_EXC_XUNIT_OLD,
ASSERT_EXC_MSTEST
Expand Down