I am somewhat new to unit tests so hopefully this question makes sense.
My Setup: Visual Studio 2010 Entity Framework 4.1 Moq
I have a Service class located in my BAL which uses the UnitOfWork in my DAL. The UnitOfWork manages access to various repositories which in turn access the database through a Context object.
I would like to create a unit test for a service class public method which is responsible for some very complicated "GetNextObject" type logic utilizing lambda expressions.
Question: I can very easily Mock my DBContext and create a DBSet of objects that I want to test my Services method against(the service class essentially queries the repository). Is this the correct way to do this or is this more of an integration test? By mocking the Context I have removed the database, but I still am using the UnitOfWork and Repository classes. Should I instead do a complicated mocking of all these objects?
Thanks! AFrieze