public void EatTest() { BaseItem neutralFlesh = createTestItem(); BaseItem spoiledFlesh = createTestItem(); FleshCategory neutralFleshCategory = (FleshCategory)neutralFlesh.GetItemCategoryByClass(typeof(FleshCategory)); FleshCategory spoiledFleshCategory = (FleshCategory)spoiledFlesh.GetItemCategoryByClass(typeof(FleshCategory)); spoiledFleshCategory.HealthEffect = -0.1f; //Act neutralFleshCategory.Eat(); spoiledFleshCategory.Eat(); }