Currently we don't do much testing at our company, except some manual checking. We occasionally create some unit tests, integration tests and ui tests, but not on a regular basis. Since a new project is coming up I want to take the opportunity to implement a better way of testing.
Question
Since most of our web applications are actually performing basic crud applications, a lot of tests seem to be trivial. And my question is basically, how do I decide where I draw the line, is there an approach for that. Altought unit testing improves the quality, it comes with a cost (in the form of writing them and maintaining them). To get concrete, here are some examples.
Example
I have a productService with the following method:
public Product GetProduct(int productId)
{
return database.GetObject<Product>("select * FROM products wh..",productId)
}
Should I create a unit test for this method? Let's say that I would, than I'm just checking if I'm calling the right query and if I'm forwarding the productId parameter correctly to the database layer. This feels already a little bit trivial. But to make it worse, I'm already planning to create an integration test for this method to check if it all works correctly together so this unit test won't add any value. But if I would follow TDD (which is dead, partly because of this reason as I have heard), than I should create that unit test.
Any thoughts?