From a387a06a05fb2bf869cce01d02c4ca96b896aa2a Mon Sep 17 00:00:00 2001 From: lobroda Date: Mon, 9 Oct 2023 19:24:41 +0100 Subject: [PATCH] ADD : Update Model with favoritebooks methods --- Model/IUserLibraryManager.cs | 2 ++ Stub/UserLibraryStub.cs | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/Model/IUserLibraryManager.cs b/Model/IUserLibraryManager.cs index d39c82b..99abbd2 100644 --- a/Model/IUserLibraryManager.cs +++ b/Model/IUserLibraryManager.cs @@ -21,6 +21,8 @@ namespace Model Task AddToFavorites(string bookId); Task RemoveFromFavorites(Book book); Task RemoveFromFavorites(string bookId); + Task>> GetFavoritesBooks(int index, int count); + Task UpdateBook(Book updatedBook); diff --git a/Stub/UserLibraryStub.cs b/Stub/UserLibraryStub.cs index 3547f49..ddff999 100644 --- a/Stub/UserLibraryStub.cs +++ b/Stub/UserLibraryStub.cs @@ -421,5 +421,10 @@ namespace Stub { return Task.FromResult(Tuple.Create(Contacts.LongCount(), Contacts.Skip(index * count).Take(count))); } + + public Task>> GetFavoritesBooks(int index, int count) + { + return Task.FromResult(Tuple.Create(Favorites.LongCount(), Favorites.Skip(index * count).Take(count))); + } } }