Let’s look at some different ways you could implement the strategy pattern in C#. First, I’d like to briefly mention why we care about design patterns and where the strategy pattern fits in.
Tag: functional programming
I’ve started using ts-jest for a project at work and have really enjoyed it. It works great because you can write your tests in TypeScript and ts-jest will just compile on-the-fly then run your tests like you would expect. However, tests can easily become unreadable or harder-to-read (which isn’t limited to ts-jest, of course).
In order to make the tests more readable, I am creating generic functions that I can re-use in my test cases. Read more