Injecting AutoMapper profiles in tests

In the newer services at my client, AutoMapper is used to map DTO‘s to database objects and back. Because mocking a mapping isn’t obvious, a lot of behaviour wasn’t tested and that’s unacceptable. Let’s find out how to properly inject an IMapper with actual mappings.

Continue reading “Injecting AutoMapper profiles in tests”

Advertisements

Patterns and disciplines from a proof of concept – Part 5

While I worked at my previous employer, I build a proof of concept to improve their ability to search. I will rebuild that proof of concept and I’ll highlight all the patterns and principles I used to build this code. All code related to this proof of concept can be found in a repository on my Github account.

In this fifth and last part, I’ll talk about additional benefits that this implementation can use.

Continue reading “Patterns and disciplines from a proof of concept – Part 5”

Patterns and disciplines from a proof of concept – Part 4

While I worked at my previous employer, I build a proof of concept to improve their ability to search. I will rebuild that proof of concept and I’ll highlight all the patterns and principles I used to build this code. All code related to this proof of concept can be found in a repository on my Github account.

In this fourth instalment, I want to highlight how I divided the solution in different projects.

Continue reading “Patterns and disciplines from a proof of concept – Part 4”

Patterns and disciplines from a proof of concept – Part 3

While I worked at my previous employer, I build a proof of concept to improve their ability to search. I will rebuild that proof of concept and I’ll highlight all the patterns and principles I used to build this code. All code related to this proof of concept can be found in a repository on my Github account.

In this third part, I’m going to discuss the actual search algorithm. The generic implementation of the search algorithm can be found in the DefaultImplementation project.

Continue reading “Patterns and disciplines from a proof of concept – Part 3”

Boxing impact on string concatenation

Recently I went to a session given by Maarten Balliauw about memory management. In that talk, he mentioned the effect boxing and unboxing has on performance. He also talked about how a lot of strings can affect memory management. This got me thinking on the impact of boxing and unboxing when I format strings. What kind of impact does it have?

Continue reading “Boxing impact on string concatenation”