Click here to Skip to main content
15,890,579 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Is there a parser for .NET expression trees? Pin
honey the codewitch29-Jul-20 5:48
mvahoney the codewitch29-Jul-20 5:48 
GeneralRe: Is there a parser for .NET expression trees? Pin
Sander Rossel29-Jul-20 8:23
professionalSander Rossel29-Jul-20 8:23 
GeneralRe: Is there a parser for .NET expression trees? Pin
honey the codewitch29-Jul-20 8:29
mvahoney the codewitch29-Jul-20 8:29 
GeneralRe: Is there a parser for .NET expression trees? Pin
Sander Rossel29-Jul-20 8:46
professionalSander Rossel29-Jul-20 8:46 
GeneralRe: Is there a parser for .NET expression trees? Pin
honey the codewitch29-Jul-20 10:45
mvahoney the codewitch29-Jul-20 10:45 
GeneralRe: Is there a parser for .NET expression trees? Pin
Sander Rossel29-Jul-20 22:08
professionalSander Rossel29-Jul-20 22:08 
GeneralRe: Is there a parser for .NET expression trees? Pin
honey the codewitch30-Jul-20 1:13
mvahoney the codewitch30-Jul-20 1:13 
GeneralRe: Is there a parser for .NET expression trees? Pin
Sander Rossel30-Jul-20 11:50
professionalSander Rossel30-Jul-20 11:50 
honey the codewitch wrote:
but it would take forever to test
I wrote some TagHelpers for ASP.NET Core Razor and all your writing inspired me to write an article about it.
So, clean up the code a bit (which took me hours, it was a mess, you'd be proud Laugh | :laugh: ) and add unit tests...

Turns out it's pretty much impossible to unit test those things!
Here's the unit tests for the InputTagHelper: Mvc/InputTagHelperTest.cs at master · aspnet/Mvc · GitHub[^]
That's almost 2000 lines and I inherited that thing WTF | :WTF:
I'd need to test others too, like Mvc/SelectTagHelperTest.cs at master · aspnet/Mvc · GitHub[^] and Mvc/ValidationMessageTagHelperTest.cs at master · aspnet/Mvc · GitHub[^], another 1300 something LOC just for the basic tests Frown | :(

But it doesn't stop there.
It makes use of a "TestableHtmlGenerator", which I'm obviously going to need.
Luckily, it's not a big class, but what the hell does it all do? Smile | :)
Mvc/TestableHtmlGenerator.cs at master · aspnet/Mvc · GitHub[^]

A single test would need about as much LOC as my entire library Sigh | :sigh:
So to hell with unit tests and back to some good old manual testing and praying for the best Laugh | :laugh:

GeneralRe: Is there a parser for .NET expression trees? Pin
honey the codewitch30-Jul-20 11:56
mvahoney the codewitch30-Jul-20 11:56 
GeneralRe: Is there a parser for .NET expression trees? Pin
Sander Rossel30-Jul-20 12:08
professionalSander Rossel30-Jul-20 12:08 
GeneralRe: Is there a parser for .NET expression trees? Pin
Member 1402550329-Jul-20 21:59
Member 1402550329-Jul-20 21:59 
GeneralRe: Is there a parser for .NET expression trees? Pin
Sander Rossel30-Jul-20 11:37
professionalSander Rossel30-Jul-20 11:37 
GeneralRe: Is there a parser for .NET expression trees? Pin
quantasm2329-Jul-20 22:52
quantasm2329-Jul-20 22:52 
AnswerRe: Is there a parser for .NET expression trees? Pin
ZevSpitz30-Jul-20 1:43
professionalZevSpitz30-Jul-20 1:43 
GeneralRe: Is there a parser for .NET expression trees? Pin
honey the codewitch30-Jul-20 2:05
mvahoney the codewitch30-Jul-20 2:05 
AnswerRe: Is there a parser for .NET expression trees? Pin
buckrogerz30-Jul-20 4:51
buckrogerz30-Jul-20 4:51 
AnswerRe: Is there a parser for .NET expression trees? Pin
nassimi30-Jul-20 21:33
nassimi30-Jul-20 21:33 
GeneralRe: Is there a parser for .NET expression trees? Pin
honey the codewitch31-Jul-20 0:58
mvahoney the codewitch31-Jul-20 0:58 
GeneralRe: Is there a parser for .NET expression trees? Pin
nassimi21-Jun-22 22:57
nassimi21-Jun-22 22:57 
GeneralDo you all use wysiwyg web site editors. Pin
Ron Anders29-Jul-20 3:40
Ron Anders29-Jul-20 3:40 
GeneralRe: Do you all use wysiwyg web site editors. PinPopular
DerekT-P29-Jul-20 3:47
professionalDerekT-P29-Jul-20 3:47 
GeneralRe: Do you all use wysiwyg web site editors. Pin
SortaCore29-Jul-20 20:06
SortaCore29-Jul-20 20:06 
GeneralRe: Do you all use wysiwyg web site editors. Pin
honey the codewitch29-Jul-20 3:54
mvahoney the codewitch29-Jul-20 3:54 
GeneralRe: Do you all use wysiwyg web site editors. Pin
Joan M29-Jul-20 4:01
professionalJoan M29-Jul-20 4:01 
GeneralRe: Do you all use wysiwyg web site editors. Pin
F-ES Sitecore29-Jul-20 5:11
professionalF-ES Sitecore29-Jul-20 5:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.