I need to add unit tests and increase code coverage of an application that is based o store procedure calls using Entity Framework.
Example 1:
public virtual DbSet<Person> Persons { get; set; }
public virtual IEnumerable<Person> PersonsFromSP()
{
return Persons.SqlQuery("spGetPersons").ToList();
}
Example 2:
public virtual IEnumerable<Animal> AnimalsFromSP()
{
return Database.SqlQuery<Animal>("spGetAnimals").ToList();
}
There's also code with business logic and other stuff, but it's all based on these calls.
Whats a good approach at testing this?
Thanks in advance.