Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Test]
- public void AddMoreThanOneReciepeItems()
- {
- var inventory = new HeroInventory();
- var itemA = new RecipeItem("A", 5, 5, 5, 5, 5, new List<string>());
- var itemB = new RecipeItem("B", 5, 5, 5, 5, 5, new List<string>());
- inventory.AddRecipeItem(itemA);
- inventory.AddRecipeItem(itemB);
- var typeInventory = inventory.GetType()
- .GetField("recipeItems", BindingFlags.Instance | BindingFlags.NonPublic);
- var fildDict = (Dictionary<string, IRecipe>)typeInventory.GetValue(inventory);
- var count = fildDict.Count;
- Assert.AreEqual(2, count);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement