DEV Community

Discussion on: Using Extension Methods in C# to Build Fluent Code

Collapse
 
rafalpienkowski profile image
Rafal Pienkowski

Nice post.

I’m a fan of the Extension methods. Like in your examples, I combine them with the Builder pattern too. I think that this combination creates a readable Domain Specific Language (DSL) that could be used in the test case scenarios for an application. With such a DSL, we can build our System Under Test (SUT) in a very descriptive way.

I can't wait for your next article.

Cheers.

Collapse
 
integerman profile image
Matt Eland

I've done that before and really like the power and simplicity of that, plus the way it makes tests more maintainable. I really should write about that at some point soon.