❔ Unit testing code smell?

Hello, I'm writing a parser and doing unit test of it, however the unit test I created seems so complicated that something must be off I do not know how to proceed with simplifying it, could anyone give a suggestion? https://pastebin.com/Xa1p0jK6
Pastebin
[TestMethod] public void WhenPassedGroupExpression() - ...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
5 Replies
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
mrphil2105
mrphil21052y ago
I think that has to be the longest unit test I have ever seen You might want to split it into more tests or something else to reduce the length Another good way is to use AutoFixture to generate your test classes and test data And FluentAssertions to make the assertions more readable
Anton
Anton2y ago
your code lacks helpers for syntax tree deep equality checks and syntax factories for building syntax trees with code
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts