Mariusz Wojcik
  • Home
  • Author
  • GitHub
  • Presentations

Patterns

A collection of 4 posts

Patterns

Single Responsibility Principle applied to exception logging

In the previous post How to log exceptions I said that you should let your logging framework handle exception logging. In this post I will explain why it is a bad idea to

  • Mariusz Wojcik
    Mariusz Wojcik
1 min read
Patterns

Using policies to handle exceptions while calling external services

Exception handling very easily gets ugly. Typical try...catch block clutters method and grows with any new exception discovered. Then, bits of code are copied between methods which require same error handling. Adding

  • Mariusz Wojcik
    Mariusz Wojcik
3 min read
Patterns

Create test objects using Builder pattern and methods chaining

In my previous post “Create test objects using Factory Methods or Object Mother pattern” I described how Factory Method and Object Mother patterns can be used to help with creating object instances. Presented

  • Mariusz Wojcik
    Mariusz Wojcik
2 min read
Patterns

Create test objects using Factory Methods or Object Mother pattern

One of the nightmares in unit testing is creating instances of tested objects. While our tested object grows, very quickly the code repetition appears in the test fixture. It is very important to

  • Mariusz Wojcik
    Mariusz Wojcik
2 min read
Mariusz Wojcik © 2025
Latest Posts Twitter Ghost