Search announcements unit tests
This commit is contained in:
1 parent
893a683d9a
commit
0ac97bd31a
2 files changed
+38
-1
No files matched your search
@@ -48,6 +48,11 @@ namespace Tests.Mocks
|
||||
return announcements.GetRange(p + c, c);
|
||||
}
|
||||
|
||||
public List<Announcement> SearchAnnouncement(string query)
|
||||
{
|
||||
return announcements.Where(x => x.Title.Contains(query) || x.Description.Contains(query)).ToList();
|
||||
}
|
||||
|
||||
public void UpdateAnnouncement(int id, string title, string description, bool isImportant, bool isSticky)
|
||||
{
|
||||
Announcement announcement = announcements.First(x => x.ID == id);
|
||||
|
||||
Reference in new issue
Block a user