public class MockPieRepository : IPieRepository
{
private readonly ICategoryRepository _categoryRepository = new MockCategoryRepository();
public IEnumerable<Pie> AllPies =>
new List<Pie>
{
new Pie {PieId = 1, etc},
new Pie {PieId = 2, etc}
};
public IEnumerable<Pie> PiesOfTheWeek
{
get
{
return AllPies.Where(p => p.IsPieOfTheWeek);
}
}
}
public class MockPieRepository : IPieRepository
{
private readonly ICategoryRepository _categoryRepository = new MockCategoryRepository();
public IEnumerable<Pie> AllPies =>
new List<Pie>
{
new Pie {PieId = 1, etc},
new Pie {PieId = 2, etc}
};
public IEnumerable<Pie> PiesOfTheWeek
{
get
{
return AllPies.Where(p => p.IsPieOfTheWeek);
}
}
}