public override int GetHashCode() => BreadType.GetHashCode() ^ CheeseType.GetHashCode() ^ HasMayo.GetHashCode() ^ HasMustard.GetHashCode() ^ IsToasted.GetHashCode() ^ MeatType.GetHashCode() ^ Vegetables.GetHashCode();
public CheesePhrase( IFoodProduct currentFood, CheeseType Cheese) { this.currentFood = currentFood; this.Cheese = Cheese; }
private IAdditive CheeseFactory(CheeseType sauce, int quantity) { switch (sauce) { case CheeseType.BlueCheese: return(new BlueCheese(quantity)); case CheeseType.Cheddar: return(new Cheddar(quantity)); case CheeseType.Emmental: return(new Emmental(quantity)); case CheeseType.Feta: return(new Feta(quantity)); case CheeseType.Gouda: return(new Gouda(quantity)); case CheeseType.Mozzarella: return(new Mozzarella(quantity)); case CheeseType.SmokedCheese: return(new SmokedCheese(quantity)); default: throw new NullReferenceException("No such cheese"); } }
public Pizza(DoughType doughType, bool isRedPepper, Size size, CheeseType cheeseType, List <string> vegetables) { this.doughType = doughType; this.isRedPepper = isRedPepper; this.size = size; this.cheeseType = cheeseType; this.vegetables = vegetables; }
public void PrepareRecipe(BreadType breadType, CheeseType cheeseType) { _sandwichRecipe.ChooseBread(breadType); _sandwichRecipe.AddProtein(); _sandwichRecipe.AddCheese(cheeseType); _sandwichRecipe.AddVegetables(); _sandwichRecipe.AddSauces(); }
public Sandwich(BreadType bread, CheeseType cheese, bool hasMayo, bool istoasted, bool HasMustard, List <string> vegetables) { this.Bread = bread; this.Cheese = cheese; this.HasMayo = hasMayo; this.IsToasted = IsToasted; this.HasMustard = HasMustard; this.Vegetables = vegetables; }
public void GetMyOwnCalories_WeightAndTypeSpecified_EmitsWeightAndTypeRelatedCalories( int weight, CheeseType typeOfCheese, int expectedCalories) { var instanceUnderTest = this.GetInstanceUnderTest(weight, typeOfCheese); instanceUnderTest.GetMyOwnCalories().Should().Be(expectedCalories); }
private Ingredients.Cheese.Cheese GetInstanceUnderTest(int weight, CheeseType typeOfCheese) { var foodIngrediantMock = new Mock <IFoodProduct>(); return(new Ingredients.Cheese.Cheese( foodIngrediantMock.Object, weight, typeOfCheese)); }
public Cheese(string name, string description, CheeseType type, int rating) { Name = name; Description = description; Type = type; Rating = rating; CheeseId = nextId; nextId++; }
public Sandwich(BreadType bread, CheeseType cheese, bool hasMayo, bool istoasted, bool HasMustard, List<string> vegetables) { this.Bread = bread; this.Cheese = cheese; this.HasMayo = hasMayo; this.IsToasted = IsToasted; this.HasMustard = HasMustard; this.Vegetables = vegetables; }
public Cheese( IFoodProduct decoratedInstance, int weight, CheeseType cheeseType) : base(decoratedInstance, weight) { this.cheeseType = cheeseType; this.weight = weight; }
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; }
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; }
public Entree(int calories, int fats, int proteins, int carbohydrates, string toppings, PattyType patty, string bun, CheeseType cheese, string title, int price, string desc) : base(title, price, desc) { Bun = bun; CheeseType = cheese; PattyType = patty; Toppings = toppings; Calories = calories; Fats = fats; Proteins = proteins; Carbohydrates = carbohydrates; }
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 Cheese CreateCheese(string name, string description, CheeseType type, int rating) { Cheese newCheese = new Cheese { Name = name, Description = description, Type = type, Rating = rating }; return(newCheese); }
public IActionResult Update(string id, CheeseType CheeseIn) { var Cheese = _cheeseTypeService.Get(id); if (Cheese == null) { return(NotFound()); } _cheeseTypeService.Update(id, CheeseIn); return(NoContent()); }
public static Burger MakeBurger(CheeseType cheeseType, int cheeseQuantity, int meatQuantity) { var delay = ((cheeseType.GetHashCode() * cheeseQuantity) + meatQuantity) * 500; Thread.Sleep(delay); return(new Burger { Id = Guid.NewGuid(), Cheese = cheeseType, CheeseQuantity = cheeseQuantity, MeatQuantity = meatQuantity }); }
private int GetPriceForHundredGrammForCheeseType( CheeseType typeOfCheese) { int price = 0; switch (typeOfCheese) { case CheeseType.Tilsitter: price = 50; break; case CheeseType.CottageCheese: price = 10; break; case CheeseType.Edamer: price = 60; break; default: throw new ArgumentOutOfRangeException(nameof(typeOfCheese)); } return(price); }
private int GetCaloriesOfHundredGrammForCheeseType( CheeseType typeOfCheese) { int calories = 0; switch (typeOfCheese) { case CheeseType.Tilsitter: calories = 70; break; case CheeseType.CottageCheese: calories = 87; break; case CheeseType.Edamer: calories = 110; break; default: throw new ArgumentOutOfRangeException(nameof(typeOfCheese)); } return(calories); }
public LovelyCheese() { cheeseType = (CheeseType) Random.Range( 0, 3 ); }
public LovelyCheese() { cheeseType = (CheeseType)Random.Range(0, 3); }
//smell - possibility of more than one constructor to deal with different possibilities //But hard to know which constructor public Sandwich(BreadType breadType, bool isToasted, CheeseType cheeseType) { BreadType = breadType; IsToasted = isToasted; CheeseType = cheeseType; }
public CheeseType Create(CheeseType CheeseType) { _CheeseType.InsertOne(CheeseType); return(CheeseType); }
public static CheesePhrase AddCheese(this IFoodProduct instance, CheeseType typeOfCheese) { return(new CheesePhrase(instance, typeOfCheese)); }
public void Update(string id, CheeseType CheeseTypeIn) => _CheeseType.ReplaceOne(CheeseType => CheeseType.Id == id, CheeseTypeIn);
public void Remove(CheeseType CheeseTypeIn) => _CheeseType.DeleteOne(CheeseType => CheeseType.Id == CheeseTypeIn.Id);
public Cheese Update(Cheese cheese, CheeseType type) { return(_updaters.FirstOrDefault(x => x.CheeseType == type)?.Update(cheese) ?? throw new ArgumentNullException(nameof(type))); }
public abstract void AddCheese(CheeseType cheeseType);
private Cheese(int amountOfHoles, string name, CheeseType type) { AmountOfHoles = amountOfHoles; Name = name; CheeseType = type; }
public override void AddCheese(CheeseType cheeseType) { _sandwichRecipe.Cheese = cheeseType; }
public ActionResult <CheeseType> Create(CheeseType cheeseType) { _cheeseTypeService.Create(cheeseType); return(CreatedAtRoute("GetCheeseType", new { id = cheeseType.Id.ToString() }, cheeseType)); }