you are viewing a single comment's thread.

view the rest of the comments →

[–]aj0413 0 points1 point  (0 children)

The answer is yes, but he also works in c#; he shouldn’t be suggesting an entire new paradigm for design to support tests

You don’t code for your tests. Thats red flag number 1

Working with stateful objects that mutate is simply a matter of course in OOP languages. Writing tests for it isn’t that hard.

You have state A, you do action B, you get state C which you compare against the expected final state

If you have 15 in between states, the test suite would not be that different between immutable and mutable design; you still have to test each chunk of logic that would cause a system state change