Design consideration when using Extention methods

Extension methods are a nice way to warp up code that you often execute on different classes. However do not forget to consider the test implications of the Extension methods you are creating.

A simple mutating extension method is easy enough. But if you have an extension method that does remote calls to other classes. You will need to create expectations or results for those calls if you Mock them.

Sometimes you could want to put such logic in extension methods since you do not own the class or assembly that you use. In such scenarios consider writing a class that implements the logic using composition. The class can then be tested independently and mocked for the usages of it.