some refactors
continuous-integration/drone/push Build is passing Details

master
Maxime BATISTA 2 years ago
parent 6b91eb0913
commit 5abe2c4a4c

@ -33,8 +33,10 @@
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#FFFFFF" BaseSize="128,128" />
<!-- Images -->
<MauiImage Include="Resources\Images\*" />

@ -1,17 +1,17 @@
using LocalServices;
using LocalServices.Data;
using Models;
using LocalServices;
using LocalServices.Data;
using Models;
using System.Collections.Immutable;
namespace Tests
{
public class AccountRecipesPreferencesTests
namespace Tests
{
public class AccountRecipesPreferencesTests
{
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());
private static readonly Account SAMPLE_ACC = new Account(SAMPLE_USER, "mail");
private static readonly Recipe SAMPLE_RECIPE = new RecipeBuilder("foo", SAMPLE_USER).Build();
[Fact]
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());
private static readonly Account SAMPLE_ACC = new Account(SAMPLE_USER, "mail");
private static readonly Recipe SAMPLE_RECIPE = new RecipeBuilder("foo", SAMPLE_USER).Build();
[Fact]
public void Review()
{
var fav_inserted = false;
@ -26,8 +26,8 @@ namespace Tests
pref.SetReviewScore(SAMPLE_RECIPE.Info, 3);
Assert.True(fav_inserted);
Assert.True(rate_inserted);
}
}
public void AddWeeklyList()
{
var inserted = false;
@ -41,6 +41,6 @@ namespace Tests
pref.AddToWeeklyList(SAMPLE_RECIPE.Info, 88);
Assert.True(inserted);
Assert.True(pref.GetWeeklyList().Contains((SAMPLE_RECIPE.Info, 88)));
}
}
}
}
}
}

@ -16,7 +16,7 @@ public partial class SearchPage : ContentPage
BindingContext = this;
this.recipesService = recipes;
this.preferences = preferences;
InitializeComponent();
InitializeComponent();
}
public void MakeSearch(string prompt)

Loading…
Cancel
Save