Beispiel #1
0
        private void AssertRecipe(ArtisanRecipeDto recipe)
        {
            Assert.That(recipe.Name, Is.Not.Null.Or.Empty);
            Assert.That(recipe.Id, Is.Not.Null.Or.Empty);
            Assert.That(recipe.Slug, Is.Not.Null.Or.Empty);
            Assert.NotZero(recipe.Cost);

            AssertItemType(recipe.ItemProduced);
            foreach (var reagent in recipe.Reagents)
            {
                AssertReagent(reagent);
            }
        }
Beispiel #2
0
        private ArtisanRecipe MapRecipe(ArtisanId artisanId, ArtisanRecipeRank rank, ArtisanRecipeSource source, ArtisanRecipeDto input)
        {
            var reagents = MapReagents(input.Reagents);

            return(new ArtisanRecipe
            {
                Id = new RecipeId(artisanId, input.Slug),
                Name = input.Name,
                Cost = input.Cost,
                Rank = rank,
                Source = source,
                Reagents = reagents,
                CraftedItemId = new ItemId(input.ItemProduced.Slug, input.ItemProduced.Id)
            });
        }
 private async Task <RecipeDto> ProcessArtisanRecipe(string artisanSlug, ArtisanRecipeDto recipe)
 {
     return(await Client.GetRecipeAsync(artisanSlug, recipe.Slug));
 }