using LocalServices.Data;
using Models;
using System.Collections.Immutable;
namespace LocalServices.Data
{
///
/// stub implementation for IDatabase
///
internal class StubDatabase : IDatabase
{
private readonly User User = new User(new Uri("https://images.pexels.com/photos/37546/woman-portrait-face-studio-37546.jpeg?cs=srgb&dl=beauty-face-headshot-37546.jpg&fm=jpg"), "David", Guid.NewGuid());
public Account? GetAccount(string email, string passwordHash)
{
return new Account(User, "david@gmail.com");
}
public Recipe? GetRecipe(Guid id)
{
return new Recipe(new RecipeInfo("Foo", 4, 5, new Uri("https://th.bing.com/th/id/R.e57009c4044bef3e86f8a7b18a7cf36a?rik=K3dSu3KoTgeRSw&pid=ImgRaw&r=0"), 4.5F, id), User, new List { new Ingredient("Chocolate", 4, "g") }.ToImmutableList(), new List { new PreparationStep("Eat Chocolate", "Eat the chocolate") }.ToImmutableList());
}
public ImmutableDictionary GetRecipeListOf(Guid user)
{
return new Dictionary().ToImmutableDictionary();
}
public RecipeRate GetRecipeRate(Guid user, Guid recipe)
{
return new RecipeRate(true, 4);
}
public void InsertAccount(Account account, string passwordHash)
{
}
public void InsertInUserList(Guid userId, Guid recipeId, uint persAmount)
{
}
public void InsertRate(Guid userId, Guid recipeId, RecipeRate rate)
{
}
public void InsertRecipe(Recipe recipe)
{
}
public void InsertUser(User user)
{
}
public ImmutableList ListAllRecipes()
{
return new List().ToImmutableList();
}
public ImmutableDictionary ListRatesOf(Guid user)
{
return new Dictionary().ToImmutableDictionary();
}
public void RemoveFromUserList(Guid userId, Guid recipeId)
{
}
public void RemoveRecipe(Guid id)
{
}
}
}