public override int GetHashCode() => BreadType.GetHashCode() ^
 CheeseType.GetHashCode() ^
 HasMayo.GetHashCode() ^
 HasMustard.GetHashCode() ^
 IsToasted.GetHashCode() ^
 MeatType.GetHashCode() ^
 Vegetables.GetHashCode();
Exemple #2
0
 public MeatPhrase(
     IFoodProduct currentFood,
     MeatType meat)
 {
     this.currentFood = currentFood;
     this.meat        = meat;
 }
Exemple #3
0
        private IAdditive MeatFactory(MeatType meat, int quantity)
        {
            switch (meat)
            {
            case MeatType.Beacon:
                return(new Bacon(quantity));

            case MeatType.Beef:
                return(new Beef(quantity));

            case MeatType.Chicken:
                return(new Chicken(quantity));

            case MeatType.Ham:
                return(new Ham(quantity));

            case MeatType.Pepperoni:
                return(new Pepperoni(quantity));

            case MeatType.Sausage:
                return(new Sausage(quantity));

            default:
                throw new NullReferenceException("No such meat");
            }
        }
 public Meat(
     IFoodProduct decoratedInstance,
     int weight,
     Ingredients.Meat.MeatType meatType) :
     base(decoratedInstance, weight)
 {
     this.meatType = meatType;
 }
Exemple #5
0
        private Ingredients.Meat.Meat GetInstanceUnderTest(int weight, MeatType typeOfMeat)
        {
            var foodIngrediantMock = new Mock <IFoodProduct>();

            return(new Ingredients.Meat.Meat(
                       foodIngrediantMock.Object,
                       weight,
                       typeOfMeat));
        }
Exemple #6
0
        public void GetMyOwnCalories_WeightAndTypeSpecified_EmitsWeightAndTypeRelatedCalories(
            int weight,
            MeatType typeOfMeat,
            int expectedCalories)
        {
            var instanceUnderTest = this.GetInstanceUnderTest(weight, typeOfMeat);

            instanceUnderTest.GetMyOwnCalories().Should().Be(expectedCalories);
        }
Exemple #7
0
 public Sandwich(Breadtype breadtype, bool isToasted, Chessetype chessetype, bool hasMustard, MeatType meatType, List <string> vegetables, bool hasMayo)
 {
     this.breadType  = breadtype;
     this.isToasted  = isToasted;
     this.chesseType = chessetype;
     this.hasMustard = hasMustard;
     this.meatType   = meatType;
     this.vegetables = vegetables;
     this.hasMayo    = hasMayo;
 }
 public Sandwich(BreadType breadType, bool isToasted, CheeseType cheeseType, MeatType meatType, bool hasMustard, bool hasMayo, List <string> vegetables)
 {
     BreadType  = breadType;
     IsToasted  = isToasted;
     CheeseType = cheeseType;
     MeatType   = meatType;
     HasMustard = hasMustard;
     HasMayo    = hasMayo;
     Vegetables = vegetables;
 }
Exemple #9
0
 public Sandwich1(BreadType breadType, bool isToasted, CheesType cheesType, MeatType meatType, bool hasMustard, bool hasMayo, List <string> vegetables)
 {
     this.breadType  = breadType;
     this.isToasted  = isToasted;
     this.cheesType  = cheesType;
     this.meatType   = meatType;
     this.hasMustard = hasMustard;
     this.hasMayo    = hasMayo;
     this.vegetables = vegetables;
 }
Exemple #10
0
 public Sandwich(BreadType breadType, bool isToasted, CheeseType cheeseType, MeatType meatType, bool hasMustard,
                 bool hasMayo, List <string> vegetables)
 {
     _breadType  = breadType;
     _isToasted  = isToasted;
     _cheeseType = cheeseType;
     _meatType   = meatType;
     _hasMustard = hasMustard;
     _hasMayo    = hasMayo;
     _vegetables = vegetables;
 }
Exemple #11
0
 public Sandwich_Original(BreadType breadType, bool isToasted, CheeseType cheeseType,
                          MeatType meatType, bool hasMustard, bool hasMayo, List <string> vegetables)
 {
     _BreadType  = breadType;
     _IsToasted  = isToasted;
     _CheeseType = cheeseType;
     _MeatType   = meatType;
     _HasMustard = hasMustard;
     _HasMayo    = hasMayo;
     _Vegetables = vegetables;
 }
        public PizzaOrderBuilder SetMeat(MeatType type)
        {
            switch (type)
            {
            case MeatType.beef:
                Console.WriteLine("You ordered beef");
                break;

            case MeatType.chicken:
                Console.WriteLine("You ordered chicken");
                break;
            }
            return(this);
        }
Exemple #13
0
        static void Main(string[] args)
        {
            Chef chef = new Chef();

            chef.PrintingTheValuesOfChef();
            chef.ActiveChefs();

            Console.WriteLine("................................");

            Meat meat = new Meat();

            meat.PrintMeatText();
            meat.MeatRatio();
            Console.WriteLine("................................");

            MeatType meatType = new MeatType();

            meatType.PrintMeatText();
            meatType.ChooseMeatType();
            meatType.DifferentMeatTypes();



            Console.WriteLine("................................");

            Meat[] printingMeatMessages = { new Meat(), new MeatDish(), new MeatType() };
            printingMeatMessages[0].PrintMeatText();
            printingMeatMessages[1].PrintMeatText();
            printingMeatMessages[2].PrintMeatText();

            Console.WriteLine("................................");

            MeatVariations printingMeatText = new MeatVariations();

            printingMeatText.PrintMeatText();

            Console.WriteLine("................................");

            Meat printingMeatText1 = new MeatDish();

            printingMeatText1.PrintMeatText();


            Console.WriteLine("................................");



            // Console.ReadLine();
        }
Exemple #14
0
    public CardControl CreateCard(MeatType type, ColorElement color, Guid ID)
    {
        var view = Instantiate(_cardPrefab).GetComponent <CardControl>();

        view.ModelID = ID;
        view.Color   = color;
        view.Type    = type;

        var position = transform.position;

        position.z -= 1f;
        view.transform.position = position;

        return(view);
    }
        private int GetPriceForHundredGrammMeatOfType(
            MeatType typeOfMeat)
        {
            int price = 0;

            switch (typeOfMeat)
            {
            case MeatType.Pork:
                price = 130;
                break;

            case MeatType.Seafood:
                price = 230;
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(typeOfMeat));
            }
            return(price);
        }
        private int GetCaloriesOfHundredGrammForMeatOfType(
            MeatType typeOfMeat)
        {
            int calories = 0;

            switch (typeOfMeat)
            {
            case MeatType.Pork:
                calories = 78;
                break;

            case MeatType.Seafood:
                calories = 250;
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(typeOfMeat));
            }
            return(calories);
        }
Exemple #17
0
 public static MeatPhrase AddMeat(this IFoodProduct instance, MeatType typeOfMeat)
 {
     return(new MeatPhrase(instance, typeOfMeat));
 }
Exemple #18
0
 public void setMeatType(MeatType meatType)
 {
     this.meatType = meatType;
 }
 public MeatCard(MeatType type, ColorElement color)
 {
     Type  = type;
     Color = color;
 }
Exemple #20
0
 public Meat(string name, float calories, MeatType origin, float weight) : base(name, calories, weight)
 {
     Origin = origin;
 }