I have a controller. From where I am calling(DI of BLL) to the Business Logic layer(BLL) . From BLL I am calling the Data access layer(DAL) through one more interface.
DAL layer constructor is injected with the DBContext instance( there is no Interface injected here).
So by using MOQ we can test controller , BLL & intermediated layer. But how to test the DLL layer?
public class DAL():IDAL
{
private DBEntities entity;
public DAL(DBEntities DB)
{
entity = DB;
}
public list<string> ABC()
{
var a = SqlMapper.Query<class>(entity.Database.Connection, "",param,commandType: CommandType.StoredProcedure).ToList();
return a;
}
}
Basically my query how to & what to mock here? Here we implement the IDAL, but we don't inject it here.