コード例 #1
0
        public void ShouldListDefaultIngredients()
        {
            DinoNuggets   dn          = new DinoNuggets();
            List <string> ingredients = dn.Ingredients;
            // Should be six nuggets
            int nuggetCount = 0;

            foreach (string ingredient in ingredients)
            {
                if (ingredient.Equals("Chicken Nugget"))
                {
                    nuggetCount++;
                }
            }
            Assert.Equal(6, nuggetCount);
            Assert.Equal <int>(6, ingredients.Count);
        }
コード例 #2
0
        public void ShouldHaveCorrectDefaultPrice()
        {
            DinoNuggets dn = new DinoNuggets();

            Assert.Equal(4.25, dn.Price, 2);
        }
コード例 #3
0
        public void ShouldHaveCorrectDefaultCalories()
        {
            DinoNuggets dn = new DinoNuggets();

            Assert.Equal <uint>(59 * 6, dn.Calories);
        }