public void Initialize() { myShoopingListAdapter = Substitute.For <IShoppingListDataAdapter>(); myProductAdapter = Substitute.For <IProductDataAdapter>(); myRecipeAdapter = Substitute.For <IRecipeDataAdapter>(); myService = new ShoppingListService(myShoopingListAdapter, myProductAdapter, myRecipeAdapter); }
public ShoppingListService(IShoppingListDataAdapter shoppingListDataAdapter, IProductDataAdapter productDataAdapter, IRecipeDataAdapter recipeDataAdapter) { myShoppingListDataAdapter = shoppingListDataAdapter; myProductDataAdapter = productDataAdapter; this.recipeDataAdapter = recipeDataAdapter; }