Untestable code
There are a variety of telltale signs that an application, class, or method will be difficult, or even impossible, to test. Sure, there are ways around some of the following examples but it's usually best to just avoid workarounds and programmatic acrobatics. Simple is usually best, and your future self and/or future maintainers will thank you for keeping things simple.
Dependency Injection
If you're creating instances of external resources within your constructors or inside methods instead of having them passed in, it will be very difficult to write tests to cover these classes and methods. Generally, in today's modern applications, Dependency Injection frameworks are used to create and provide the external dependencies to a class. Many choose to define an interface as the contract for the dependency, providing a more flexible method for testing and the coupling to external resources.
Static
You may have a need to access static third-party classes or methods. Instead of accessing...