My work has various .Net C# classes to perform discrete actions (i.e. get items in user's shopping cart, get list of products available, etc). I am looking to added unit tests to these classes/methods using Visual Studio unit test projects. My goal is to have the unit tests self contained where they do not depend on an external database. So I started investigating SQLite. I'm thinking each unit test will create it's own "mock" database to be used by the corresponding classes/methods that the unit test is executing.
Here is the problem I am running into. The real classes/methods execute SQL with fully qualified (guess that is the right term) database names and schemas as part of the query. Example:
SELECT * FROM Database01.Schema01.Table01
In SQLite is there a way to make it work with these type of table references? I see there is an ATTACH command where you can attach multiple databases to one connection. Then you reference a table with database-name.table-name. That is still missing the middle schema part though. Any thoughts?