-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathLessonRepository.cs
More file actions
41 lines (38 loc) · 1001 Bytes
/
LessonRepository.cs
File metadata and controls
41 lines (38 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System.Collections.Generic;
using System.Linq;
using WriteUnitTest.Entities;
namespace WriteUnitTest.Repositories
{
public class LessonRepository
{
private readonly List<Lesson> lessonList;
public LessonRepository()
{
lessonList = new List<Lesson>
{
new Lesson
{
LessonId = 12,
Grade = 63.7d,
IsPassed = false
},
new Lesson
{
LessonId = 46,
Grade = 0.0d,
IsPassed = false
},
new Lesson
{
LessonId = 86,
Grade = 88.2d,
IsPassed = true
}
};
}
public Lesson GetLesson(int lessonId)
{
return lessonList.FirstOrDefault(x => x.LessonId == lessonId);
}
}
}