Wednesday, February 1, 2012

getting used to AutoMapper

AutoMapper really helps makes the classes it maps to light and thus easy to test. Whenever I make a method in a class and then struggle to test it due to the fact that I cannot bridge the constructor in the class without mocking 101 things it is really frustrating. This is the sort of noise that does not make me want to write tests. AutoMapper helps alleviate this problem. That said, I wonder if I really should be placing a method inside of a DTO and then marveling at how easy it is to test. I probably should do the same work in a .ResolveUsing rule and just set a get-setter at the DTO, huh? I'll pick Rafael's brain when he gets in...

No comments:

Post a Comment