public void RecipePriceShouldReturnCorrectValue() { var mock = new Mock <IRecipeRepository>(); mock.Setup(x => x.SumRecipePrice(13)).Returns(125); var contr = new RecipesController(mock.Object, null); contr.GetById(5); var recipe = GetRecipe().Id; var result = mock.Object.SumRecipePrice(recipe); Assert.Equal(result, mock.Object.SumRecipePrice(5)); }