Skip to content
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
5 changes: 1 addition & 4 deletions Tests/TestFrameworks/MSTestV2.Specs/FrameworkSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ public void When_mstestv2_is_used_it_should_throw_mstest_exceptions_for_assertio
Action act = () => 0.Should().Be(1);

// Assert
Exception exception = act.Should().Throw<Exception>().Which;
exception.GetType()
.FullName.Should()
.ContainEquivalentOf("Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException");
act.Should().Throw<AssertFailedException>();
}
}
3 changes: 1 addition & 2 deletions Tests/TestFrameworks/MSpec.Specs/FrameworkSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ public class When_mspec_is_used
{
Because of = () => Exception = Catch.Exception(() => 0.Should().Be(1));

It should_fail = () => Exception.Should().NotBeNull().And.BeAssignableTo<Exception>();
It should_have_a_specific_reason = () => Exception.GetType().FullName.Should().ContainEquivalentOf("Machine.Specifications.SpecificationException");
It should_fail_with_a_specification_exception = () => Exception.Should().BeOfType<SpecificationException>();

private static Exception Exception;
}
5 changes: 1 addition & 4 deletions Tests/TestFrameworks/NUnit3.Specs/FrameworkSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ public void When_nunit3_is_used_it_should_throw_nunit_exceptions_for_assertion_f
Action act = () => 0.Should().Be(1);

// Assert
Exception exception = act.Should().Throw<Exception>().Which;
exception.GetType()
.FullName.Should()
.ContainEquivalentOf("NUnit.Framework.AssertionException");
act.Should().Throw<AssertionException>();
}
}
4 changes: 2 additions & 2 deletions Tests/TestFrameworks/XUnit2.Specs/FrameworkSpecs.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using FluentAssertions;
using Xunit;
using Xunit.Sdk;

namespace XUnit2.Specs;

Expand All @@ -13,7 +14,6 @@ public void When_xunit2_is_used_it_should_throw_xunit_exceptions_for_assertion_f
Action act = () => 0.Should().Be(1);

// Assert
Exception exception = act.Should().Throw<Exception>().Which;
exception.GetType().FullName.Should().ContainEquivalentOf("xunit");
act.Should().Throw<XunitException>();
}
}