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
Replace ExpectedException with Assert.Throws in unit tests #227
Comments
This will break most pending PRs (does the fix for #226 do so too?). Rebasing on top of current master will probably be required for most PRs. To mitigate a bit this problem, usage of |
The PRs won't break because of |
Since this entails a lot of manual work, it might be interesting to try and tackle this more smartly by automating the following steps via Roslyn:
|
I've updated the code. |
@GeorgeVovos Cool. Do you have a PR to submit for review? |
ExpectedException
has been removed starting with NUnit 3. Unit tests need to be adjusted to useAssert.Throws
instead, which is the recommended and better way.Meanwhile #226 adds a local
[ExpectedException]
so tests using that attribute can compile and run unchanged with NUnit 3. The local[ExpectedException]
implementation should be removed when migration to usingAssert.Throws
is complete.Test files that need addressing are:
AcquireTest.cs
AssertCountTest.cs
AssertTest.cs
AtLeastTest.cs
BatchTest.cs
CartesianTest.cs
ConcatTest.cs
ConsumeTest.cs
CountByTest.cs
DistinctByTest.cs
EndsWithTest.cs
EquiZipTest.cs
ExceptByTest.cs
ExcludeTest.cs
FoldTest.cs
ForEachTest.cs
FullGroupJoinTest.cs
GenerateTest.cs
GroupAdjacentTest.cs
IncrementalTest.cs
IndexTest.cs
InterleaveTest.cs
LagTest.cs
LeadTest.cs
MaxByTest.cs
MinByTest.cs
NestedLoopTest.cs
PadTest.cs
PairwiseTest.cs
PartitionTest.cs
PermutationsTest.cs
PipeTest.cs
PreScanTest.cs
PrependTest.cs
RandomSubsetTest.cs
RandomTest.cs
RepeatTest.cs
RunLengthEncodeTest.cs
SegmentTest.cs
SingleOrFallbackTest.cs
SkipUntilTest.cs
SortedMergeTest.cs
StartsWithTest.cs
SubsetTest.cs
TagFirstLastTest.cs
TakeEveryTest.cs
TakeLastTest.cs
TakeUntilTest.cs
ToDataTableTest.cs
ToDelimitedStringTest.cs
TraceTest.cs
TraverseTest.cs
WindowedTest.cs
ZipLongestTest.cs
ZipShortestTest.cs
The text was updated successfully, but these errors were encountered: