You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ShopNCook/Tests/CatastrophicPreformancesDat...

44 lines
1.5 KiB

using LocalServices.Data;
using Models;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace Tests
{
public class CatastrophicPreformancesDatabaseTests
{
private static readonly User SAMPLE_USER = new User(new Uri("https://www.referenseo.com/wp-content/uploads/2019/03/image-attractive-960x540.jpg"), "user", Guid.NewGuid());
/*
[Fact]
public void TestInsertRecipe()
{
var db = new CatastrophicPerformancesDatabase("/tmp");
db.InsertUser(SAMPLE_USER);
db.InsertRecipe(SAMPLE_RECIPE);
Assert.Contains(SAMPLE_RECIPE, db.ListAllRecipes());
}
[Fact]
public void TestInsertRate()
{
var db = new CatastrophicPerformancesDatabase("/tmp");
var rate = new RecipeRate(true, 4);
db.InsertUser(SAMPLE_USER);
db.InsertRate(SAMPLE_USER.Id, SAMPLE_RECIPE.Info.Id, rate);
Assert.Equal(rate, db.GetRecipeRate(SAMPLE_USER.Id, SAMPLE_RECIPE.Info.Id));
Assert.True(db.ListRatesOf(SAMPLE_USER.Id)[SAMPLE_USER.Id] == rate);
}
[Fact]
public void TestInsertWeeklyList()
{
var db = new CatastrophicPerformancesDatabase("/tmp");
db.InsertUser(SAMPLE_USER);
db.InsertRecipe(SAMPLE_RECIPE);
db.InsertInUserList(SAMPLE_USER.Id, SAMPLE_RECIPE.Info.Id, 99);
Assert.True(db.GetRecipeListOf(SAMPLE_USER.Id)[SAMPLE_RECIPE.Info.Id] == 99);
}*/
}
}